Struct rustc::ty::VariantDef
[−]
[src]
pub struct VariantDef {
pub did: DefId,
pub name: Name,
pub discr: VariantDiscr,
pub fields: Vec<FieldDef>,
pub ctor_kind: CtorKind,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
did: DefId
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
The variant's DefId. If this is a tuple-like struct, this is the DefId of the struct's ctor.
name: Name
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
discr: VariantDiscr
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fields: Vec<FieldDef>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
ctor_kind: CtorKind
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<'a, 'gcx, 'tcx> VariantDef[src]
impl<'a, 'gcx, 'tcx> VariantDefpub fn find_field_named(&self, name: Name) -> Option<&FieldDef>[src]
pub fn find_field_named(&self, name: Name) -> Option<&FieldDef>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn index_of_field_named(&self, name: Name) -> Option<usize>[src]
pub fn index_of_field_named(&self, name: Name) -> Option<usize>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn field_named(&self, name: Name) -> &FieldDef[src]
pub fn field_named(&self, name: Name) -> &FieldDef🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for VariantDef[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for VariantDeffn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl Debug for VariantDef[src]
impl Debug for VariantDefAuto Trait Implementations
impl !Send for VariantDef
impl !Send for VariantDefimpl !Sync for VariantDef
impl !Sync for VariantDef