[][src]Struct rustc_hir::hir::Variant

pub struct Variant<'hir> {
    pub ident: Ident,
    pub attrs: &'hir [Attribute],
    pub id: HirId,
    pub data: VariantData<'hir>,
    pub disr_expr: Option<AnonConst>,
    pub span: Span,
}

Fields

ident: Ident

Name of the variant.

attrs: &'hir [Attribute]

Attributes of the variant.

id: HirId

Id of the variant (not the constructor, see VariantData::ctor_hir_id()).

data: VariantData<'hir>

Fields and constructor id of the variant.

disr_expr: Option<AnonConst>

Explicit discriminant (e.g., Foo = 1).

span: Span

Span

Trait Implementations

impl<'hir> Debug for Variant<'hir>[src]

impl<'hir> Decodable for Variant<'hir>[src]

impl<'hir> Encodable for Variant<'hir>[src]

impl<'hir, __CTX> HashStable<__CTX> for Variant<'hir> where
    __CTX: HashStableContext
[src]

Auto Trait Implementations

impl<'hir> !RefUnwindSafe for Variant<'hir>

impl<'hir> !Send for Variant<'hir>

impl<'hir> !Sync for Variant<'hir>

impl<'hir> Unpin for Variant<'hir>

impl<'hir> !UnwindSafe for Variant<'hir>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.