pub enum AbiVariant {
GuestImport,
GuestExport,
}
Expand description
We use a different ABI for wasm importing functions exported by the host than for wasm exporting functions imported by the host.
Note that this reflects the flavor of ABI we generate, and not necessarily
the way the resulting bindings will be used by end users. See the comments
on the Direction
enum in gen-core for details.
The bindings ABI has a concept of a “guest” and a “host”. There are two variants of the ABI, one specialized for the “guest” importing and calling a function defined and exported in the “host”, and the other specialized for the “host” importing and calling a function defined and exported in the “guest”.
Variants§
GuestImport
The guest is importing and calling the function.
GuestExport
The guest is defining and exporting the function.
Trait Implementations§
source§impl Clone for AbiVariant
impl Clone for AbiVariant
source§fn clone(&self) -> AbiVariant
fn clone(&self) -> AbiVariant
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AbiVariant
impl Debug for AbiVariant
source§impl PartialEq for AbiVariant
impl PartialEq for AbiVariant
impl Copy for AbiVariant
impl Eq for AbiVariant
impl StructuralPartialEq for AbiVariant
Auto Trait Implementations§
impl Freeze for AbiVariant
impl RefUnwindSafe for AbiVariant
impl Send for AbiVariant
impl Sync for AbiVariant
impl Unpin for AbiVariant
impl UnwindSafe for AbiVariant
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§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
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.