pub struct FunctionData {
pub name: String,
pub params: Vec<Param>,
pub body: Rc<Vec<Statement>>,
pub closure: Rc<RefCell<Scope>>,
pub is_arrow: bool,
pub is_async: bool,
pub is_generator: bool,
pub bound_this: Option<Box<Value>>,
}Expand description
ユーザー定義関数のデータ。
Fields§
§name: String§params: Vec<Param>§body: Rc<Vec<Statement>>§closure: Rc<RefCell<Scope>>クロージャが捕捉した定義時スコープ。
is_arrow: boolアロー関数か(this を捕捉し、自身の this/arguments を持たない)。
is_async: boolasync 関数か(呼び出すと Promise を返す)。
is_generator: boolgenerator 関数か(呼び出すと Generator を返す)。
bound_this: Option<Box<Value>>アロー関数が捕捉した this。
Trait Implementations§
Source§impl Clone for FunctionData
impl Clone for FunctionData
Source§fn clone(&self) -> FunctionData
fn clone(&self) -> FunctionData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for FunctionData
impl !Send for FunctionData
impl !Sync for FunctionData
impl !UnwindSafe for FunctionData
impl Freeze for FunctionData
impl Unpin for FunctionData
impl UnsafeUnpin for FunctionData
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