pub struct JsFunction {
pub name: String,
pub params: Vec<String>,
pub body: Vec<JsStmt>,
pub is_async: bool,
pub is_export: bool,
}Expand description
A top-level JavaScript function declaration.
Fields§
§name: StringThe name of the function.
params: Vec<String>The parameter names.
body: Vec<JsStmt>The function body statements.
is_async: boolWhether this function is declared with async.
is_export: boolWhether this function is exported (for ES module export).
Trait Implementations§
Source§impl Clone for JsFunction
impl Clone for JsFunction
Source§fn clone(&self) -> JsFunction
fn clone(&self) -> JsFunction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsFunction
impl Debug for JsFunction
Source§impl Display for JsFunction
impl Display for JsFunction
Source§impl PartialEq for JsFunction
impl PartialEq for JsFunction
impl StructuralPartialEq for JsFunction
Auto Trait Implementations§
impl Freeze for JsFunction
impl RefUnwindSafe for JsFunction
impl Send for JsFunction
impl Sync for JsFunction
impl Unpin for JsFunction
impl UnsafeUnpin for JsFunction
impl UnwindSafe for JsFunction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more