pub struct JsFunction<'a> { /* private fields */ }Expand description
Wraps an object from the QuickJs runtime. Provides convenience property accessors.
Implementations§
Source§impl<'a> JsFunction<'a>
impl<'a> JsFunction<'a>
pub fn try_from_value(value: OwnedJsValue<'a>) -> Result<Self, ValueError>
pub fn into_value(self) -> OwnedJsValue<'a>
pub fn call( &self, args: Vec<OwnedJsValue<'a>>, ) -> Result<OwnedJsValue<'a>, ExecutionError>
Trait Implementations§
Source§impl<'a> Clone for JsFunction<'a>
impl<'a> Clone for JsFunction<'a>
Source§fn clone(&self) -> JsFunction<'a>
fn clone(&self) -> JsFunction<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for JsFunction<'a>
impl<'a> !RefUnwindSafe for JsFunction<'a>
impl<'a> !Send for JsFunction<'a>
impl<'a> !Sync for JsFunction<'a>
impl<'a> Unpin for JsFunction<'a>
impl<'a> !UnwindSafe for JsFunction<'a>
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