pub struct Function { /* private fields */ }
Implementations§
Source§impl Function
impl Function
Sourcepub fn into_object(self) -> Object
pub fn into_object(self) -> Object
Consumes the function and downgrades it to a JavaScript object.
Sourcepub fn call<A, R>(&self, args: A) -> Result<R>
pub fn call<A, R>(&self, args: A) -> Result<R>
Calls the function with the given arguments, with this
set to undefined
.
Sourcepub fn call_method<T, A, R>(&self, this: T, args: A) -> Result<R>
pub fn call_method<T, A, R>(&self, this: T, args: A) -> Result<R>
Calls the function with the given this
and arguments.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Function
impl !RefUnwindSafe for Function
impl !Send for Function
impl !Sync for Function
impl Unpin for Function
impl !UnwindSafe for Function
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