Struct rustc_query_impl::ty::VariantDef [−][src]
pub struct VariantDef {
pub def_id: DefId,
pub ctor_def_id: Option<DefId>,
pub ident: Ident,
pub discr: VariantDiscr,
pub fields: Vec<FieldDef, Global>,
pub ctor_kind: CtorKind,
flags: VariantFlags,
}Expand description
Definition of a variant – a struct’s fields or an enum variant.
Fields
def_id: DefIdDefId that identifies the variant itself.
If this variant belongs to a struct or union, then this is a copy of its DefId.
ctor_def_id: Option<DefId>DefId that identifies the variant’s constructor.
If this variant is a struct variant, then this is None.
ident: IdentVariant or struct name.
discr: VariantDiscrDiscriminant of this variant.
fields: Vec<FieldDef, Global>Fields of this variant.
ctor_kind: CtorKindType of constructor of variant.
flags: VariantFlagsFlags of the variant (e.g. is field list non-exhaustive)?
Auto Trait Implementations
impl RefUnwindSafe for VariantDef
impl !Send for VariantDef
impl !Sync for VariantDef
impl Unpin for VariantDef
impl UnwindSafe for VariantDef
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
impl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don’t need to if the corresponding DepNode is anonymous). Read more
This method tries to recover the query key from the given DepNode,
something which is needed when forcing DepNodes during red-green
evaluation. The query system will only call this method if
fingerprint_style() is not FingerprintStyle::Opaque.
It is always valid to return None here, in which case incremental
compilation will treat the query as having changed instead of forcing it. 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: 72 bytes