pub struct NativeLoader<'loader> { /* private fields */ }
Expand description
Native library loader.
Methods from Deref<Target = NonNullConst<LibraryLoaderInterface>>§
Trait Implementations§
Source§impl<'loader> Clone for NativeLoader<'loader>
impl<'loader> Clone for NativeLoader<'loader>
Source§fn clone(&self) -> NativeLoader<'loader>
fn clone(&self) -> NativeLoader<'loader>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'loader> Debug for NativeLoader<'loader>
impl<'loader> Debug for NativeLoader<'loader>
Source§impl Deref for NativeLoader<'_>
impl Deref for NativeLoader<'_>
Source§type Target = NonNullConst<LibraryLoaderInterface>
type Target = NonNullConst<LibraryLoaderInterface>
The resulting type after dereferencing.
Source§impl DerefMut for NativeLoader<'_>
impl DerefMut for NativeLoader<'_>
Source§impl<'a> LibraryLoaderAPI<'a> for NativeLoader<'a>
impl<'a> LibraryLoaderAPI<'a> for NativeLoader<'a>
Source§type InternalLoader = NativeLoaderInternal<'a>
type InternalLoader = NativeLoaderInternal<'a>
Type of the internal loader.
Source§fn to_interface(&self) -> NonNullConst<LibraryLoaderInterface>
fn to_interface(&self) -> NonNullConst<LibraryLoaderInterface>
Fetches a pointer that can be used with the interface.
Source§unsafe fn from_interface(
interface: NonNullConst<LibraryLoaderInterface>,
) -> Self
unsafe fn from_interface( interface: NonNullConst<LibraryLoaderInterface>, ) -> Self
Construct a new instance from a pointer. Read more
Source§unsafe fn from_void_ptr(interface: NonNullConst<c_void>) -> Self
unsafe fn from_void_ptr(interface: NonNullConst<c_void>) -> Self
Construct a new instance from a void pointer. Read more
Source§unsafe fn load(
&mut self,
path: &impl AsRef<Path>,
) -> Result<InternalLibrary<Owned>, Error>
unsafe fn load( &mut self, path: &impl AsRef<Path>, ) -> Result<InternalLibrary<Owned>, Error>
Loads a library. The resulting handle is unique. Read more
Source§unsafe fn unload(
&mut self,
internal: InternalLibrary<Owned>,
) -> Result<(), Error>
unsafe fn unload( &mut self, internal: InternalLibrary<Owned>, ) -> Result<(), Error>
Unloads a library. Read more
Source§unsafe fn get_data_symbol<O, U>(
&self,
internal: &InternalLibrary<O>,
symbol: &impl AsRef<CStr>,
caster: impl FnOnce(NonNullConst<c_void>) -> &'a U,
) -> Result<Symbol<'a, &'a U>, Error>where
O: ImmutableAccessIdentifier,
unsafe fn get_data_symbol<O, U>(
&self,
internal: &InternalLibrary<O>,
symbol: &impl AsRef<CStr>,
caster: impl FnOnce(NonNullConst<c_void>) -> &'a U,
) -> Result<Symbol<'a, &'a U>, Error>where
O: ImmutableAccessIdentifier,
Fetches a data symbol from a library. Read more
Source§unsafe fn get_function_symbol<O, U>(
&self,
internal: &InternalLibrary<O>,
symbol: &impl AsRef<CStr>,
caster: impl FnOnce(CBaseFn) -> U,
) -> Result<Symbol<'a, U>, Error>where
O: ImmutableAccessIdentifier,
unsafe fn get_function_symbol<O, U>(
&self,
internal: &InternalLibrary<O>,
symbol: &impl AsRef<CStr>,
caster: impl FnOnce(CBaseFn) -> U,
) -> Result<Symbol<'a, U>, Error>where
O: ImmutableAccessIdentifier,
Fetches a function symbol from a library. Read more
Source§unsafe fn get_internal_interface(&self) -> Self::InternalLoader
unsafe fn get_internal_interface(&self) -> Self::InternalLoader
Fetches a pointer to the internal interface. Read more
Source§impl<'loader> Ord for NativeLoader<'loader>
impl<'loader> Ord for NativeLoader<'loader>
Source§fn cmp(&self, other: &NativeLoader<'loader>) -> Ordering
fn cmp(&self, other: &NativeLoader<'loader>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'loader> PartialEq for NativeLoader<'loader>
impl<'loader> PartialEq for NativeLoader<'loader>
Source§impl<'loader> PartialOrd for NativeLoader<'loader>
impl<'loader> PartialOrd for NativeLoader<'loader>
impl<'loader> Copy for NativeLoader<'loader>
impl<'loader> Eq for NativeLoader<'loader>
impl LibraryLoaderABICompat for NativeLoader<'_>
impl<'loader> StructuralPartialEq for NativeLoader<'loader>
Auto Trait Implementations§
impl<'loader> Freeze for NativeLoader<'loader>
impl<'loader> RefUnwindSafe for NativeLoader<'loader>
impl<'loader> Send for NativeLoader<'loader>
impl<'loader> Sync for NativeLoader<'loader>
impl<'loader> Unpin for NativeLoader<'loader>
impl<'loader> UnwindSafe for NativeLoader<'loader>
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