Struct emf_core_base_rs::library::library_loader::NativeLoaderInternal [−][src]
pub struct NativeLoaderInternal<'loader> { /* fields omitted */ }
Native library loader internal interface.
Implementations
impl NativeLoaderInternal<'_>
[src]
impl NativeLoaderInternal<'_>
[src]pub unsafe fn load_ext(
&mut self,
path: &impl AsRef<Path>,
flags: i32
) -> Result<InternalLibrary<Owned>, Error>
[src]
&mut self,
path: &impl AsRef<Path>,
flags: i32
) -> Result<InternalLibrary<Owned>, Error>
Loads a library. The resulting handle is unique.
The argument flags
is passed to dlopen
.
Failure
The function fails if path
is invalid or
the call to dlopen
fails.
Return
Handle on success, error otherwise.
Safety
The function crosses the ffi boundary. Direct usage of a NativeLoaderInternal may break some invariants of the library api, if not handled with care.
pub unsafe fn get_native_handle<O>(
&self,
internal: &InternalLibrary<O>
) -> Result<NativeLibraryHandle, Error> where
O: ImmutableAccessIdentifier,
[src]
&self,
internal: &InternalLibrary<O>
) -> Result<NativeLibraryHandle, Error> where
O: ImmutableAccessIdentifier,
Returns the underlying handle of a library.
Failure
The function fails if internal
is invalid.
Return
Handle on success, error otherwise.
Safety
The function crosses the ffi boundary. Direct usage of a NativeLoaderInternal may break some invariants of the library api, if not handled with care.
Methods from Deref<Target = NonNullConst<NativeLibraryLoaderInterface>>
pub unsafe fn into_mut(&self) -> NonNull<T>
[src]
Acquires a mutable version of the pointer.
Safety
It is undefined behavior if the underlying pointer is not already mutable.
pub unsafe fn as_ref(&self) -> &T
[src]
Trait Implementations
impl<'loader> Clone for NativeLoaderInternal<'loader>
[src]
impl<'loader> Clone for NativeLoaderInternal<'loader>
[src]fn clone(&self) -> NativeLoaderInternal<'loader>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'loader> Copy for NativeLoaderInternal<'loader>
[src]
impl<'loader> Copy for NativeLoaderInternal<'loader>
[src]impl<'loader> Debug for NativeLoaderInternal<'loader>
[src]
impl<'loader> Debug for NativeLoaderInternal<'loader>
[src]impl Deref for NativeLoaderInternal<'_>
[src]
impl Deref for NativeLoaderInternal<'_>
[src]type Target = NonNullConst<NativeLibraryLoaderInterface>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'loader> Eq for NativeLoaderInternal<'loader>
[src]
impl<'loader> Eq for NativeLoaderInternal<'loader>
[src]impl<'a> LibraryLoaderAPI<'a> for NativeLoaderInternal<'a>
[src]
impl<'a> LibraryLoaderAPI<'a> for NativeLoaderInternal<'a>
[src]type InternalLoader = Self
Type of the internal loader.
fn to_interface(&self) -> NonNullConst<LibraryLoaderInterface>
[src]
unsafe fn from_interface(
interface: NonNullConst<LibraryLoaderInterface>
) -> Self
[src]
interface: NonNullConst<LibraryLoaderInterface>
) -> Self
unsafe fn from_void_ptr(interface: NonNullConst<c_void>) -> Self
[src]
unsafe fn load(
&mut self,
path: &impl AsRef<Path>
) -> Result<InternalLibrary<Owned>, Error>
[src]
&mut self,
path: &impl AsRef<Path>
) -> Result<InternalLibrary<Owned>, Error>
unsafe fn unload(
&mut self,
internal: InternalLibrary<Owned>
) -> Result<(), Error>
[src]
&mut self,
internal: InternalLibrary<Owned>
) -> Result<(), Error>
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,
[src]
&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_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,
[src]
&self,
internal: &InternalLibrary<O>,
symbol: &impl AsRef<CStr>,
caster: impl FnOnce(CBaseFn) -> U
) -> Result<Symbol<'a, U>, Error> where
O: ImmutableAccessIdentifier,
unsafe fn get_internal_interface(&self) -> Self::InternalLoader
[src]
impl<'loader> Ord for NativeLoaderInternal<'loader>
[src]
impl<'loader> Ord for NativeLoaderInternal<'loader>
[src]impl<'loader> PartialEq<NativeLoaderInternal<'loader>> for NativeLoaderInternal<'loader>
[src]
impl<'loader> PartialEq<NativeLoaderInternal<'loader>> for NativeLoaderInternal<'loader>
[src]fn eq(&self, other: &NativeLoaderInternal<'loader>) -> bool
[src]
fn ne(&self, other: &NativeLoaderInternal<'loader>) -> bool
[src]
impl<'loader> PartialOrd<NativeLoaderInternal<'loader>> for NativeLoaderInternal<'loader>
[src]
impl<'loader> PartialOrd<NativeLoaderInternal<'loader>> for NativeLoaderInternal<'loader>
[src]fn partial_cmp(&self, other: &NativeLoaderInternal<'loader>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Send for NativeLoaderInternal<'_>
[src]
impl Send for NativeLoaderInternal<'_>
[src]impl<'loader> StructuralEq for NativeLoaderInternal<'loader>
[src]
impl<'loader> StructuralEq for NativeLoaderInternal<'loader>
[src]impl<'loader> StructuralPartialEq for NativeLoaderInternal<'loader>
[src]
impl<'loader> StructuralPartialEq for NativeLoaderInternal<'loader>
[src]impl Sync for NativeLoaderInternal<'_>
[src]
impl Sync for NativeLoaderInternal<'_>
[src]Auto Trait Implementations
impl<'loader> RefUnwindSafe for NativeLoaderInternal<'loader>
impl<'loader> RefUnwindSafe for NativeLoaderInternal<'loader>
impl<'loader> Unpin for NativeLoaderInternal<'loader>
impl<'loader> Unpin for NativeLoaderInternal<'loader>
impl<'loader> UnwindSafe for NativeLoaderInternal<'loader>
impl<'loader> UnwindSafe for NativeLoaderInternal<'loader>