Struct resast::expr::ArrowFuncExpr
source · [−]pub struct ArrowFuncExpr<'a> {
pub id: Option<Ident<'a>>,
pub params: Vec<FuncArg<'a>>,
pub body: ArrowFuncBody<'a>,
pub expression: bool,
pub generator: bool,
pub is_async: bool,
}
Expand description
An arrow function
let x = () => y;
let q = x => {
return x + 1;
}
Fields
id: Option<Ident<'a>>
params: Vec<FuncArg<'a>>
body: ArrowFuncBody<'a>
expression: bool
generator: bool
is_async: bool
Trait Implementations
sourceimpl<'a> Clone for ArrowFuncExpr<'a>
impl<'a> Clone for ArrowFuncExpr<'a>
sourcefn clone(&self) -> ArrowFuncExpr<'a>
fn clone(&self) -> ArrowFuncExpr<'a>
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 more
sourceimpl<'a> Debug for ArrowFuncExpr<'a>
impl<'a> Debug for ArrowFuncExpr<'a>
sourceimpl<'a> From<ArrowFuncExpr<'a>> for ArrowFuncExpr<'a>
impl<'a> From<ArrowFuncExpr<'a>> for ArrowFuncExpr<'a>
sourcefn from(other: ArrowFuncExpr<'a>) -> Self
fn from(other: ArrowFuncExpr<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'a> PartialEq<ArrowFuncExpr<'a>> for ArrowFuncExpr<'a>
impl<'a> PartialEq<ArrowFuncExpr<'a>> for ArrowFuncExpr<'a>
sourcefn eq(&self, other: &ArrowFuncExpr<'a>) -> bool
fn eq(&self, other: &ArrowFuncExpr<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl<'a> StructuralPartialEq for ArrowFuncExpr<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ArrowFuncExpr<'a>
impl<'a> Send for ArrowFuncExpr<'a>
impl<'a> Sync for ArrowFuncExpr<'a>
impl<'a> Unpin for ArrowFuncExpr<'a>
impl<'a> UnwindSafe for ArrowFuncExpr<'a>
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