Struct syn::ExprClosure
source · pub struct ExprClosure {
pub attrs: Vec<Attribute>,
pub asyncness: Option<Async>,
pub movability: Option<Static>,
pub capture: Option<Move>,
pub or1_token: Or,
pub inputs: Punctuated<FnArg, Comma>,
pub or2_token: Or,
pub output: ReturnType,
pub body: Box<Expr>,
}
Expand description
A closure expression: |a, b| a + b
.
This type is available if Syn is built with the "full"
feature.
Fields
attrs: Vec<Attribute>
asyncness: Option<Async>
movability: Option<Static>
capture: Option<Move>
or1_token: Or
inputs: Punctuated<FnArg, Comma>
or2_token: Or
output: ReturnType
body: Box<Expr>
Trait Implementations
sourceimpl Clone for ExprClosure
impl Clone for ExprClosure
sourcefn clone(&self) -> ExprClosure
fn clone(&self) -> ExprClosure
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ExprClosure
impl Debug for ExprClosure
sourceimpl From<ExprClosure> for Expr
impl From<ExprClosure> for Expr
sourcefn from(e: ExprClosure) -> Expr
fn from(e: ExprClosure) -> Expr
Converts to this type from the input type.
sourceimpl Hash for ExprClosure
impl Hash for ExprClosure
sourceimpl PartialEq<ExprClosure> for ExprClosure
impl PartialEq<ExprClosure> for ExprClosure
sourcefn eq(&self, other: &ExprClosure) -> bool
fn eq(&self, other: &ExprClosure) -> bool
sourceimpl ToTokens for ExprClosure
impl ToTokens for ExprClosure
sourcefn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
sourcefn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Eq for ExprClosure
impl StructuralEq for ExprClosure
impl StructuralPartialEq for ExprClosure
Auto Trait Implementations
impl RefUnwindSafe for ExprClosure
impl !Send for ExprClosure
impl !Sync for ExprClosure
impl Unpin for ExprClosure
impl UnwindSafe for ExprClosure
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Spanned for Twhere
T: ToTokens,
impl<T> Spanned for Twhere
T: ToTokens,
sourcefn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty. Read more