Struct libloading::os::unix::Library [] [src]

pub struct Library {
    // some fields omitted
}

A platform-specific equivalent of the cross-platform Library.

Methods

impl Library
[src]

Find and load a shared library (module).

Locations where library is searched for is platform specific and can’t be adjusted portably.

Corresponds to dlopen(filename).

Load the dynamic libraries linked into main program.

This allows retrieving symbols from any dynamic library linked into the program, without specifying the exact library.

Corresponds to dlopen(NULL).

Get a symbol by name.

Mangling or symbol rustification is not done: trying to get something like x::y will not work.

You may append a null byte at the end of the byte string to avoid string allocation in some cases. E.g. for symbol sin you may write b"sin\0" instead of b"sin".

Unsafety

Symbol of arbitrary requested type is returned. Using a symbol with wrong type is not memory safe.

Trait Implementations

impl Drop for Library
[src]

A method called when the value goes out of scope. Read more

impl Debug for Library
[src]

Formats the value using the given formatter.