Enum aha_wit_parser::abi::AbiVariant
source · [−]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”. Wasmlink can generate glue to bridge between two “guests”, but in that case each side thinks of the glue as the “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 fuinction 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
sourceimpl Clone for AbiVariant
impl Clone for AbiVariant
sourcefn clone(&self) -> AbiVariant
fn clone(&self) -> AbiVariant
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for AbiVariant
impl Debug for AbiVariant
sourceimpl PartialEq<AbiVariant> for AbiVariant
impl PartialEq<AbiVariant> for AbiVariant
impl Copy for AbiVariant
impl Eq for AbiVariant
impl StructuralEq for AbiVariant
impl StructuralPartialEq for AbiVariant
Auto Trait Implementations
impl RefUnwindSafe for AbiVariant
impl Send for AbiVariant
impl Sync for AbiVariant
impl Unpin for AbiVariant
impl UnwindSafe for AbiVariant
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more