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 PartialEq for Arm
[src]
impl PartialEq for Arm
fn eq(&self, other: &Arm) -> bool
[src]
fn eq(&self, other: &Arm) -> bool
This 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) -> bool
This method tests for !=
.
impl Eq for Arm
[src]
impl Eq for Arm
impl Encodable for Arm
[src]
impl Encodable for Arm
impl Decodable for Arm
[src]
impl Decodable for Arm
impl Hash for Arm
[src]
impl Hash for Arm
fn 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 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