pub struct AbiTable<T: Copy> { /* private fields */ }Expand description
Load a Copy-sized vtable/descriptor struct from a dynamic library.
Implementations§
Source§impl<T: Copy> AbiTable<T>
impl<T: Copy> AbiTable<T>
Sourcepub unsafe fn load(path: &Path, symbol: &[u8]) -> Result<Self>
pub unsafe fn load(path: &Path, symbol: &[u8]) -> Result<Self>
Load a vtable struct from a dynamic library.
§Safety
- The target file must be a valid dynamic library.
- The symbol must refer to a static vtable-compatible value of type
T.
Sourcepub unsafe fn from_lib(lib: DynLib, symbol: &[u8]) -> Result<Self>
pub unsafe fn from_lib(lib: DynLib, symbol: &[u8]) -> Result<Self>
§Safety
The symbol must refer to a static vtable-compatible value of type T.
pub fn vtable(&self) -> &T
Auto Trait Implementations§
impl<T> Freeze for AbiTable<T>where
T: Freeze,
impl<T> RefUnwindSafe for AbiTable<T>where
T: RefUnwindSafe,
impl<T> Send for AbiTable<T>where
T: Send,
impl<T> Sync for AbiTable<T>where
T: Sync,
impl<T> Unpin for AbiTable<T>where
T: Unpin,
impl<T> UnsafeUnpin for AbiTable<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AbiTable<T>where
T: UnwindSafe,
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