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 Synom for Arm
[src]
impl Synom for Arm
fn parse(i: Cursor) -> PResult<Self>
[src]
fn parse(i: Cursor) -> PResult<Self>
fn description() -> Option<&'static str>
[src]
fn description() -> Option<&'static str>
A short name of the type being parsed. Read more
impl ToTokens for Arm
[src]
impl ToTokens for Arm
fn to_tokens(&self, tokens: &mut Tokens)
[src]
fn to_tokens(&self, tokens: &mut Tokens)
Write self
to the given Tokens
. Read more
fn into_tokens(self) -> Tokens
[src]
fn into_tokens(self) -> Tokens
Convert self
directly into a Tokens
object. Read more
impl Clone for Arm
[src]
impl Clone for Arm