pub struct OsLibrary(/* private fields */);Available on crate feature
module and Unix only.Expand description
This represents a module shared object.
Implementations§
Source§impl Library
impl Library
Sourcepub unsafe fn load(path: impl AsRef<Path>) -> Result<Self>
pub unsafe fn load(path: impl AsRef<Path>) -> Result<Self>
Loads a dynamic library from the given path.
§Arguments
path: full path to the shared library including extension.
returns: Result<Module, Error>
§Safety
This function is unsafe as it assumes the module to be loaded is trusted code. If the module contains any constructor which causes UB then this function causes UB.
Trait Implementations§
impl Send for Library
Auto Trait Implementations§
impl Freeze for Library
impl RefUnwindSafe for Library
impl !Sync for Library
impl Unpin for Library
impl UnwindSafe for Library
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