Struct rustc::hir::Variant_ [−][src]
pub struct Variant_ {
pub name: Name,
pub attrs: HirVec<Attribute>,
pub data: VariantData,
pub disr_expr: Option<AnonConst>,
}🔬 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
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?
attrs: HirVec<Attribute>
🔬 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?
data: VariantData
🔬 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?
disr_expr: Option<AnonConst>
🔬 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?
Explicit discriminant, eg Foo = 1
Trait Implementations
impl Named for Variant_[src]
impl Named for Variant_fn name(&self) -> Name[src]
fn name(&self) -> 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?
impl Clone for Variant_[src]
impl Clone for Variant_fn clone(&self) -> Variant_[src]
fn clone(&self) -> Variant_Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for Variant_[src]
impl PartialEq for Variant_fn eq(&self, other: &Variant_) -> bool[src]
fn eq(&self, other: &Variant_) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Variant_) -> bool[src]
fn ne(&self, other: &Variant_) -> boolThis method tests for !=.
impl Eq for Variant_[src]
impl Eq for Variant_fn assert_receiver_is_total_eq(&self)[src]
fn assert_receiver_is_total_eq(&self)impl Encodable for Variant_[src]
impl Encodable for Variant_fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>🔬 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 Decodable for Variant_[src]
impl Decodable for Variant_fn decode<__D: Decoder>(d: &mut __D) -> Result<Variant_, __D::Error>[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<Variant_, __D::Error>🔬 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 Hash for Variant_[src]
impl Hash for Variant_fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for Variant_[src]
impl Debug for Variant_fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for Variant_[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for Variant_fn 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?