Enum wit_bindgen_core::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”. 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
source§fn eq(&self, other: &AbiVariant) -> bool
fn eq(&self, other: &AbiVariant) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.