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§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.