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 PartialEq for Arm[src]
impl PartialEq for Armfn eq(&self, other: &Arm) -> bool[src]
fn eq(&self, other: &Arm) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Arm) -> bool[src]
fn ne(&self, other: &Arm) -> boolThis method tests for !=.
impl Eq for Arm[src]
impl Eq for Armimpl Encodable for Arm[src]
impl Encodable for Armimpl Decodable for Arm[src]
impl Decodable for Armimpl Hash for Arm[src]
impl Hash for Armfn 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, 1.3.0
[src]Feeds a slice of this type into the given [Hasher]. Read more
impl 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