#[repr(C)]pub struct Library<'name, const N: usize> {
pub regs: [Reg; N],
/* private fields */
}Expand description
List of registered C functions to be used with
Thread::new_lib.
Fields§
§regs: [Reg; N]Implementations§
source§impl<'name, const N: usize> Library<'name, N>
impl<'name, const N: usize> Library<'name, N>
sourcepub const fn new(items: [(&'name CStr, Option<CFunction>); N]) -> Self
pub const fn new(items: [(&'name CStr, Option<CFunction>); N]) -> Self
Construct an instance of Library with a static list of functions.
sourcepub const fn as_ptr(&self) -> *const Reg
pub const fn as_ptr(&self) -> *const Reg
Return a pointer to this structure to be used with FFI.
sourcepub const fn as_reg_slice(&self) -> &[Reg]
pub const fn as_reg_slice(&self) -> &[Reg]
Return a slice of Regs that represent the registered functions.
Trait Implementations§
source§impl<'name, const N: usize> Ord for Library<'name, N>
impl<'name, const N: usize> Ord for Library<'name, N>
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<'name, const N: usize> PartialOrd for Library<'name, N>
impl<'name, const N: usize> PartialOrd for Library<'name, N>
impl<'name, const N: usize> Copy for Library<'name, N>
impl<'name, const N: usize> Eq for Library<'name, N>
impl<'name, const N: usize> StructuralPartialEq for Library<'name, N>
Auto Trait Implementations§
impl<'name, const N: usize> Freeze for Library<'name, N>
impl<'name, const N: usize> RefUnwindSafe for Library<'name, N>
impl<'name, const N: usize> !Send for Library<'name, N>
impl<'name, const N: usize> !Sync for Library<'name, N>
impl<'name, const N: usize> Unpin for Library<'name, N>
impl<'name, const N: usize> UnwindSafe for Library<'name, N>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)