pub enum FunctionBehavior {
ArrowFunction {
is_async: bool,
},
Method {
free_this_id: TypeId,
is_async: bool,
is_generator: bool,
name: TypeId,
},
Function {
this_id: TypeId,
prototype: TypeId,
is_async: bool,
is_generator: bool,
name: TypeId,
},
Constructor {
prototype: TypeId,
this_object_type: TypeId,
name: TypeId,
},
}
Expand description
TODO different place TODO maybe generic
Variants§
ArrowFunction
For arrow functions, cannot have this
bound
Method
Function
Functions defined function
. Extends above by allowing new
Fields
§
this_id: TypeId
This points the general this
object.
When calling with:
new
: an arguments should set with (free_this_id
, new object)- regularly: bound argument, else parent
this
(I think)
Constructor
Constructors, require new
Trait Implementations§
Source§impl Clone for FunctionBehavior
impl Clone for FunctionBehavior
Source§fn clone(&self) -> FunctionBehavior
fn clone(&self) -> FunctionBehavior
Returns a copy 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 FunctionBehavior
impl Debug for FunctionBehavior
impl Copy for FunctionBehavior
Auto Trait Implementations§
impl Freeze for FunctionBehavior
impl RefUnwindSafe for FunctionBehavior
impl Send for FunctionBehavior
impl Sync for FunctionBehavior
impl Unpin for FunctionBehavior
impl UnwindSafe for FunctionBehavior
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more