pub struct ExprClosure {
pub attrs: Vec<Attribute>,
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>§capture: Option<Move>§or1_token: Or§inputs: Punctuated<FnArg, Comma>§or2_token: Or§output: ReturnType§body: Box<Expr>Trait Implementations§
Source§impl Clone for ExprClosure
impl Clone for ExprClosure
Source§fn clone(&self) -> ExprClosure
fn clone(&self) -> ExprClosure
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExprClosure
impl Debug for ExprClosure
impl Eq for ExprClosure
Source§impl From<ExprClosure> for Expr
impl From<ExprClosure> for Expr
Source§fn from(e: ExprClosure) -> Expr
fn from(e: ExprClosure) -> Expr
Converts to this type from the input type.
Source§impl Hash for ExprClosure
impl Hash for ExprClosure
Source§impl PartialEq for ExprClosure
impl PartialEq for ExprClosure
Source§fn eq(&self, other: &ExprClosure) -> bool
fn eq(&self, other: &ExprClosure) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExprClosure
Auto Trait Implementations§
impl !Send for ExprClosure
impl !Sync for ExprClosure
impl Freeze for ExprClosure
impl RefUnwindSafe for ExprClosure
impl Unpin for ExprClosure
impl UnsafeUnpin for ExprClosure
impl UnwindSafe for ExprClosure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Spanned for Twhere
T: ToTokens,
impl<T> Spanned for Twhere
T: ToTokens,
Source§fn 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.