#[repr(C)]pub struct NativeLibAbiV1 {
pub struct_size: usize,
pub abi_major: u16,
pub abi_minor: u16,
pub instantiate: NativeAbiInstantiate,
pub destroy_instance: NativeAbiDestroyInstance,
pub manifest: NativeAbiManifest,
pub call: NativeAbiCall,
pub destroy_bytes: NativeAbiDestroyBytes,
pub destroy_error: NativeAbiDestroyError,
}Expand description
The v1 native library vtable: header plus the entrypoint function table.
Fields§
§struct_size: usizeByte size of this struct, matching NativeLibAbiHeaderV1::struct_size.
abi_major: u16Major ABI version the library was built against.
abi_minor: u16Minor ABI version the library was built against.
instantiate: NativeAbiInstantiateInstance-creation entry.
destroy_instance: NativeAbiDestroyInstanceInstance-destruction entry.
manifest: NativeAbiManifestManifest-fetch entry.
call: NativeAbiCallFunction-call entry.
destroy_bytes: NativeAbiDestroyBytesByte-buffer free entry.
destroy_error: NativeAbiDestroyErrorError free entry.
Implementations§
Source§impl NativeLibAbiV1
impl NativeLibAbiV1
Sourcepub const HEADER_SIZE: usize
pub const HEADER_SIZE: usize
Byte size of the leading NativeLibAbiHeaderV1 prefix.
Sourcepub const fn new(
instantiate: NativeAbiInstantiate,
destroy_instance: NativeAbiDestroyInstance,
manifest: NativeAbiManifest,
call: NativeAbiCall,
destroy_bytes: NativeAbiDestroyBytes,
destroy_error: NativeAbiDestroyError,
) -> Self
pub const fn new( instantiate: NativeAbiInstantiate, destroy_instance: NativeAbiDestroyInstance, manifest: NativeAbiManifest, call: NativeAbiCall, destroy_bytes: NativeAbiDestroyBytes, destroy_error: NativeAbiDestroyError, ) -> Self
Builds a v1 vtable, stamping in the current size and version.
Sourcepub const fn header(&self) -> NativeLibAbiHeaderV1
pub const fn header(&self) -> NativeLibAbiHeaderV1
Extracts the version header prefix of this vtable.
Trait Implementations§
Source§impl Clone for NativeLibAbiV1
impl Clone for NativeLibAbiV1
Source§fn clone(&self) -> NativeLibAbiV1
fn clone(&self) -> NativeLibAbiV1
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 Copy for NativeLibAbiV1
Auto Trait Implementations§
impl Freeze for NativeLibAbiV1
impl RefUnwindSafe for NativeLibAbiV1
impl Send for NativeLibAbiV1
impl Sync for NativeLibAbiV1
impl Unpin for NativeLibAbiV1
impl UnsafeUnpin for NativeLibAbiV1
impl UnwindSafe for NativeLibAbiV1
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