pub struct VariantDef {
pub idx: VariantIdx,
pub adt_def: AdtDef,
}
Expand description
Definition of a variant, which can be either a struct / union field or an enum variant.
Fields§
§idx: VariantIdx
§adt_def: AdtDef
The data type where this variant comes from. For now, we use this to retrieve information about the variant itself so we don’t need to cache more information.
§Warning
Do not access this field directly!
Implementations§
Trait Implementations§
Source§impl Clone for VariantDef
impl Clone for VariantDef
Source§fn clone(&self) -> VariantDef
fn clone(&self) -> VariantDef
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 VariantDef
impl Debug for VariantDef
Source§impl Hash for VariantDef
impl Hash for VariantDef
Source§impl PartialEq for VariantDef
impl PartialEq for VariantDef
Source§impl Serialize for VariantDef
impl Serialize for VariantDef
impl Copy for VariantDef
impl Eq for VariantDef
impl StructuralPartialEq for VariantDef
Auto Trait Implementations§
impl Freeze for VariantDef
impl RefUnwindSafe for VariantDef
impl Send for VariantDef
impl Sync for VariantDef
impl Unpin for VariantDef
impl UnwindSafe for VariantDef
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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes