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 Armfn clone(&self) -> Arm[src]
fn clone(&self) -> ArmReturns 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 Armimpl Decodable for Arm[src]
impl Decodable for Armimpl Debug for Arm[src]
impl Debug for Armfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl HasAttrs for Arm[src]
impl HasAttrs for Armfn 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