Trait LibSpecifier

Source
pub trait LibSpecifier {
    // Required method
    fn load_lib(spec: Self) -> Result<Library>;
}
Expand description

Describes how to load a library from a given value for a lib X = Expr; statement in the lazy_extern! declaration. For &str or &OsStr it calls Library::new and passes the string as the library name to load. More complicated expressions are also allowed with brackets, as long as it evaluates to a type implementing LibSpecifier.

Required Methods§

Source

fn load_lib(spec: Self) -> Result<Library>

Load the library

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl LibSpecifier for Library

Passthrough implementation

Source§

fn load_lib(spec: Self) -> Result<Library>

Source§

impl LibSpecifier for Result<Library>

Passthrough implementation

Source§

fn load_lib(spec: Self) -> Result<Library>

Source§

impl<'a> LibSpecifier for &'a str

Source§

fn load_lib(spec: Self) -> Result<Library>

Load the library

Source§

impl<'a> LibSpecifier for &'a OsStr

Source§

fn load_lib(spec: Self) -> Result<Library>

Load the library

Implementors§