Struct syn::Arm [−][src]
pub struct Arm { pub attrs: Vec<Attribute>, pub leading_vert: Option<Or>, pub pats: Punctuated<Pat, Or>, pub guard: Option<(If, Box<Expr>)>, pub fat_arrow_token: FatArrow, pub body: Box<Expr>, pub comma: Option<Comma>, }
One arm of a match
expression: 0...10 => { return true; }
.
As in:
match n { 0...10 => { return true; } // ... }
This type is available if Syn is built with the "full"
feature.
Fields
attrs: Vec<Attribute>
leading_vert: Option<Or>
pats: Punctuated<Pat, Or>
guard: Option<(If, Box<Expr>)>
fat_arrow_token: FatArrow
body: Box<Expr>
comma: Option<Comma>
Trait Implementations
impl ToTokens for Arm
[src]
impl ToTokens for Arm
fn to_tokens(&self, tokens: &mut TokenStream)
[src]
fn to_tokens(&self, tokens: &mut TokenStream)
Write self
to the given TokenStream
. Read more
fn into_token_stream(self) -> TokenStream
[src]
fn into_token_stream(self) -> TokenStream
Convert self
directly into a TokenStream
object. 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 Eq for Arm
[src]
impl Eq for Arm
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 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 Clone for Arm
[src]
impl Clone for Arm