[−][src]Struct rustc_hir::Arm

pub struct Arm<'hir> {
    pub hir_id: HirId,
    pub span: Span,
    pub attrs: &'hir [Attribute],
    pub pat: &'hir Pat<'hir>,
    pub guard: Option<Guard<'hir>>,
    pub body: &'hir Expr<'hir>,
}

Represents a single arm of a match expression, e.g. <pat> (if <guard>) => <body>.

Fields

hir_id: HirIdspan: Spanattrs: &'hir [Attribute]pat: &'hir Pat<'hir>

If this pattern and the optional guard matches, then body is evaluated.

guard: Option<Guard<'hir>>

Optional guard clause.

body: &'hir Expr<'hir>

The expression the arm evaluates to if this arm matches.

Trait Implementations

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

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

Auto Trait Implementations

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

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

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

impl<'hir> Unpin for Arm<'hir>

impl<'hir> !UnwindSafe for Arm<'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> 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.