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]
fn clone(&self) -> Arm
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Arm
[src]
fn eq(&self, __arg_0: &Arm) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Arm) -> bool
[src]
This method tests for !=
.
impl Eq for Arm
[src]
impl Encodable for Arm
[src]
impl Decodable for Arm
[src]
impl Hash for Arm
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Arm
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl HasAttrs for Arm
[src]
fn attrs(&self) -> &[Attribute]
[src]
fn map_attrs<F>(self, f: F) -> Self where
F: FnOnce(Vec<Attribute>) -> Vec<Attribute>,
[src]
F: FnOnce(Vec<Attribute>) -> Vec<Attribute>,