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,
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
)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