Library

Trait Library 

Source
pub trait Library {
    // Required method
    unsafe fn load_symbol<T>(
        &self,
        name: impl AsRef<str>,
    ) -> Result<Option<Symbol<'_, T>>>;
}
Available on crate feature module only.
Expand description

Represents a library.

Required Methods§

Source

unsafe fn load_symbol<T>( &self, name: impl AsRef<str>, ) -> Result<Option<Symbol<'_, T>>>

Attempts to load the given symbol from this library.

§Arguments
  • name: the name of the symbol.

returns: Result<Symbol, Error>

§Safety

This function assumes the returned symbol is of the correct type and does not use any ABI incompatible types. If this condition is not maintained then this function is UB.

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.

Implementors§

Source§

impl Library for Library

Available on Unix only.
Source§

impl Library for VirtualLibrary