Enum AbiVariant
pub enum AbiVariant {
GuestImport,
GuestExport,
GuestImportAsync,
GuestExportAsync,
GuestExportAsyncStackful,
}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.
GuestImportAsync
GuestExportAsync
GuestExportAsyncStackful
Implementations§
§impl AbiVariant
impl AbiVariant
Trait Implementations§
§impl Clone for AbiVariant
impl Clone for AbiVariant
§fn clone(&self) -> AbiVariant
fn clone(&self) -> AbiVariant
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 AbiVariant
§impl Debug for AbiVariant
impl Debug for AbiVariant
impl Eq for AbiVariant
§impl Hash for AbiVariant
impl Hash for AbiVariant
§impl PartialEq for AbiVariant
impl PartialEq 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 UnsafeUnpin 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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more