Struct libuv::shared_libs::DLib
source · pub struct DLib { /* private fields */ }
Expand description
Shared library data type.
Implementations§
source§impl DLib
impl DLib
sourcepub fn open(filename: &str) -> Result<DLib, Box<dyn Error>>
pub fn open(filename: &str) -> Result<DLib, Box<dyn Error>>
Opens a shared library. The filename is in utf-8.
sourcepub fn sym<T>(&self, name: &str) -> Result<&T, Box<dyn Error>>
pub fn sym<T>(&self, name: &str) -> Result<&T, Box<dyn Error>>
Retrieves a data pointer from a dynamic library. It is legal for a symbol to map to NULL. Returns a DLError if the symbol was not found.
Type “T” should be either a function pointer or a *mut/*const pointer. For example: sym::<extern “C” fn()>(“test”) sym::<*mut f64>(“test”)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DLib
impl !Send for DLib
impl !Sync for DLib
impl Unpin for DLib
impl UnwindSafe for DLib
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more