pub struct NativeCall(/* private fields */);Expand description
Where a host function finds its receiver, arguments, new.target and
captured values, read through a NativeCx. The arguments stay in the
register file, rooted, while the body runs.
Implementations§
Source§impl NativeCall
impl NativeCall
pub fn this(&self, cx: &NativeCx<'_>) -> Value
Sourcepub fn arg(&self, cx: &NativeCx<'_>, index: usize) -> Value
pub fn arg(&self, cx: &NativeCx<'_>, index: usize) -> Value
Argument index; undefined past NativeCall::argc.
pub fn argc(&self) -> usize
pub fn args<'a>(&self, cx: &'a NativeCx<'_>) -> &'a [Value]
Sourcepub fn new_target(&self) -> Value
pub fn new_target(&self) -> Value
new.target; undefined for a call.
pub fn is_construct(&self) -> bool
pub fn set_data(&self, cx: &mut NativeCx<'_>, slot: usize, value: Value)
Trait Implementations§
Source§impl Clone for NativeCall
impl Clone for NativeCall
impl Copy for NativeCall
Auto Trait Implementations§
impl Freeze for NativeCall
impl RefUnwindSafe for NativeCall
impl Send for NativeCall
impl Sync for NativeCall
impl Unpin for NativeCall
impl UnsafeUnpin for NativeCall
impl UnwindSafe for NativeCall
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