Struct resast::Func [−][src]
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
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Func<'a>
impl<'a> UnwindSafe for Func<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more