Struct syntax::ast::Arm [−][src]
pub struct Arm { pub attrs: Vec<Attribute>, pub pats: Vec<P<Pat>>, pub guard: Option<P<Expr>>, pub body: P<Expr>, }
An arm of a 'match'.
E.g. 0..=10 => { println!("match!") }
as in
match 123 { 0..=10 => { println!("match!") }, _ => { println!("no match!") }, }
Fields
attrs: Vec<Attribute>
pats: Vec<P<Pat>>
guard: Option<P<Expr>>
body: P<Expr>
Trait Implementations
impl Clone for Arm
[src]
impl Clone for Arm
fn clone(&self) -> Arm
[src]
fn clone(&self) -> Arm
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Encodable for Arm
[src]
impl Encodable for Arm
impl Decodable for Arm
[src]
impl Decodable for Arm
impl Debug for Arm
[src]
impl Debug for Arm
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl HasAttrs for Arm
[src]
impl HasAttrs for Arm
fn attrs(&self) -> &[Attribute]
[src]
fn attrs(&self) -> &[Attribute]
fn map_attrs<F>(self, f: F) -> Self where
F: FnOnce(Vec<Attribute>) -> Vec<Attribute>,
[src]
fn map_attrs<F>(self, f: F) -> Self where
F: FnOnce(Vec<Attribute>) -> Vec<Attribute>,
impl ToTokens for Arm
[src]
impl ToTokens for Arm