pub struct Function {
pub id: Option<String>,
pub params: Vec<FunctionArg>,
pub body: FunctionBody,
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<String>
params: Vec<FunctionArg>
body: FunctionBody
generator: bool
is_async: bool
Trait Implementations
impl StructuralPartialEq for Function
Auto Trait Implementations
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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