pub struct Func<'a> {
pub id: Option<Ident<'a>>,
pub params: Vec<FuncArg<'a>>,
pub body: FuncBody<'a>,
pub generator: bool,
pub is_async: bool,
}
Expand description
A function, this will be part of either a function declaration (ID is required) or a function expression (ID is optional)
//function declaration
function thing() {}
//function expressions
var x = function() {}
let y = function q() {}
Fields
id: Option<Ident<'a>>
params: Vec<FuncArg<'a>>
body: FuncBody<'a>
generator: bool
is_async: bool
Implementations
Trait Implementations
sourceimpl<'a> From<PropMethod<'a>> for Func<'a>
impl<'a> From<PropMethod<'a>> for Func<'a>
sourcefn from(other: PropMethod<'a>) -> Self
fn from(other: PropMethod<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'a> PartialEq<Func<'a>> for Func<'a>
impl<'a> PartialEq<Func<'a>> for Func<'a>
impl<'a> StructuralPartialEq for Func<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Func<'a>
impl<'a> Send for Func<'a>
impl<'a> Sync for Func<'a>
impl<'a> Unpin for Func<'a>
impl<'a> UnwindSafe for Func<'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