Struct syn::ExprClosure
source · [−]pub struct ExprClosure {
pub attrs: Vec<Attribute>,
pub movability: Option<Static>,
pub asyncness: Option<Async>,
pub capture: Option<Move>,
pub or1_token: Or,
pub inputs: Punctuated<Pat, 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 only if Syn is built with the "full"
feature.
Fields
attrs: Vec<Attribute>
movability: Option<Static>
asyncness: Option<Async>
capture: Option<Move>
or1_token: Or
inputs: Punctuated<Pat, Comma>
or2_token: Or
output: ReturnType
body: Box<Expr>
Trait Implementations
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.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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