Struct wasmtime_environ::component::VariantInfo
source · pub struct VariantInfo {
pub size: DiscriminantSize,
pub payload_offset32: u32,
pub payload_offset64: u32,
}
Expand description
ABI information about the representation of a variant.
Fields§
§size: DiscriminantSize
The size of the discriminant used.
payload_offset32: u32
The offset of the payload from the start of the variant in 32-bit memories.
payload_offset64: u32
The offset of the payload from the start of the variant in 64-bit memories.
Implementations§
source§impl VariantInfo
impl VariantInfo
sourcepub fn new<'a, I>(cases: I) -> (VariantInfo, CanonicalAbiInfo)
pub fn new<'a, I>(cases: I) -> (VariantInfo, CanonicalAbiInfo)
Returns the abi information for a variant represented by the specified cases.
sourcepub const fn new_static(cases: &[Option<CanonicalAbiInfo>]) -> VariantInfo
pub const fn new_static(cases: &[Option<CanonicalAbiInfo>]) -> VariantInfo
TODO
Trait Implementations§
source§impl Clone for VariantInfo
impl Clone for VariantInfo
source§fn clone(&self) -> VariantInfo
fn clone(&self) -> VariantInfo
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 VariantInfo
impl Debug for VariantInfo
source§impl<'de> Deserialize<'de> for VariantInfo
impl<'de> Deserialize<'de> for VariantInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for VariantInfo
impl Hash for VariantInfo
source§impl PartialEq for VariantInfo
impl PartialEq for VariantInfo
source§impl Serialize for VariantInfo
impl Serialize for VariantInfo
impl Eq for VariantInfo
impl StructuralPartialEq for VariantInfo
Auto Trait Implementations§
impl Freeze for VariantInfo
impl RefUnwindSafe for VariantInfo
impl Send for VariantInfo
impl Sync for VariantInfo
impl Unpin for VariantInfo
impl UnwindSafe for VariantInfo
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.