pub struct NativeModuleInstance<'a, O> { /* private fields */ }Expand description
An instance from a native module.
Implementations§
Source§impl<O> NativeModuleInstance<'_, O>where
O: AccessIdentifier,
impl<O> NativeModuleInstance<'_, O>where
O: AccessIdentifier,
Sourcepub const unsafe fn new(handle: Option<NonNull<NativeModuleFFI>>) -> Self
pub const unsafe fn new(handle: Option<NonNull<NativeModuleFFI>>) -> Self
Construct a new instance from a handle.
§Safety
This function allows the creation of invalid handles by bypassing lifetimes.
Sourcepub const fn as_handle(&self) -> Option<NonNull<NativeModuleFFI>>
pub const fn as_handle(&self) -> Option<NonNull<NativeModuleFFI>>
Fetches the internal handle.
Source§impl NativeModuleInstance<'_, Owned>
impl NativeModuleInstance<'_, Owned>
Sourcepub const fn as_borrowed(&self) -> NativeModuleInstance<'_, BorrowImmutable<'_>>
pub const fn as_borrowed(&self) -> NativeModuleInstance<'_, BorrowImmutable<'_>>
Borrows the instance.
Sourcepub fn as_borrowed_mut(&mut self) -> NativeModuleInstance<'_, BorrowMutable<'_>>
pub fn as_borrowed_mut(&mut self) -> NativeModuleInstance<'_, BorrowMutable<'_>>
Borrows the instance mutably.
Trait Implementations§
Source§impl<'a, O: Clone> Clone for NativeModuleInstance<'a, O>
impl<'a, O: Clone> Clone for NativeModuleInstance<'a, O>
Source§fn clone(&self) -> NativeModuleInstance<'a, O>
fn clone(&self) -> NativeModuleInstance<'a, O>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a, O: Copy> Copy for NativeModuleInstance<'a, O>
Source§impl<'a, O: Debug> Debug for NativeModuleInstance<'a, O>
impl<'a, O: Debug> Debug for NativeModuleInstance<'a, O>
impl<'a, O: Eq> Eq for NativeModuleInstance<'a, O>
Source§impl<'a, O: Ord> Ord for NativeModuleInstance<'a, O>
impl<'a, O: Ord> Ord for NativeModuleInstance<'a, O>
Source§fn cmp(&self, other: &NativeModuleInstance<'a, O>) -> Ordering
fn cmp(&self, other: &NativeModuleInstance<'a, O>) -> Ordering
1.21.0 (const: unstable) · 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<'a, O: PartialEq> PartialEq for NativeModuleInstance<'a, O>
impl<'a, O: PartialEq> PartialEq for NativeModuleInstance<'a, O>
Source§impl<'a, O: PartialOrd> PartialOrd for NativeModuleInstance<'a, O>
impl<'a, O: PartialOrd> PartialOrd for NativeModuleInstance<'a, O>
impl<O> Send for NativeModuleInstance<'_, O>
impl<'a, O: PartialEq> StructuralPartialEq for NativeModuleInstance<'a, O>
impl<O> Sync for NativeModuleInstance<'_, O>
Auto Trait Implementations§
impl<'a, O> Freeze for NativeModuleInstance<'a, O>
impl<'a, O> RefUnwindSafe for NativeModuleInstance<'a, O>where
O: RefUnwindSafe,
impl<'a, O> Unpin for NativeModuleInstance<'a, O>
impl<'a, O> UnsafeUnpin for NativeModuleInstance<'a, O>
impl<'a, O> UnwindSafe for NativeModuleInstance<'a, O>where
O: RefUnwindSafe,
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