pub struct JsCompiledFunction<'a> { /* private fields */ }Expand description
A bytecode compiled function.
Implementations§
Source§impl<'a> JsCompiledFunction<'a>
impl<'a> JsCompiledFunction<'a>
Sourcepub fn eval(&'a self) -> Result<OwnedJsValue<'a>, ExecutionError>
pub fn eval(&'a self) -> Result<OwnedJsValue<'a>, ExecutionError>
Evaluate this compiled function and return the resulting value.
Sourcepub fn to_bytecode(&self) -> Result<Vec<u8>, ExecutionError>
pub fn to_bytecode(&self) -> Result<Vec<u8>, ExecutionError>
Convert this compiled function into QuickJS bytecode.
Bytecode can be stored and loaded with [Context::compile].
Trait Implementations§
Source§impl<'a> Clone for JsCompiledFunction<'a>
impl<'a> Clone for JsCompiledFunction<'a>
Source§fn clone(&self) -> JsCompiledFunction<'a>
fn clone(&self) -> JsCompiledFunction<'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 JsCompiledFunction<'a>
impl<'a> !RefUnwindSafe for JsCompiledFunction<'a>
impl<'a> !Send for JsCompiledFunction<'a>
impl<'a> !Sync for JsCompiledFunction<'a>
impl<'a> Unpin for JsCompiledFunction<'a>
impl<'a> !UnwindSafe for JsCompiledFunction<'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