pub enum Def<'tcx> {
Adt(AdtDef<'tcx>),
Variant(&'tcx VariantDef),
Field(&'tcx FieldDef),
Primitive,
}
Expand description
A visibility node in the layout.
Variants
Adt(AdtDef<'tcx>)
Variant(&'tcx VariantDef)
Field(&'tcx FieldDef)
Primitive
Trait Implementations
impl<'tcx> Copy for Def<'tcx>
impl<'tcx> Def for Def<'tcx>
impl<'tcx> Eq for Def<'tcx>
impl<'tcx> StructuralEq for Def<'tcx>
impl<'tcx> StructuralPartialEq for Def<'tcx>
Auto Trait Implementations
impl<'tcx> RefUnwindSafe for Def<'tcx>
impl<'tcx> Send for Def<'tcx>
impl<'tcx> Sync for Def<'tcx>
impl<'tcx> Unpin for Def<'tcx>
impl<'tcx> UnwindSafe for Def<'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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
Size for each variant:
Adt
: 8 bytesVariant
: 8 bytesField
: 8 bytesPrimitive
: 0 bytes