pub struct WebRuntime { /* private fields */ }Implementations§
Trait Implementations§
Source§impl JsRuntime for WebRuntime
impl JsRuntime for WebRuntime
Source§fn eval_async(&mut self, code: &str) -> JsResultFuture<'_>
fn eval_async(&mut self, code: &str) -> JsResultFuture<'_>
Evaluate JS code and await the result if it’s a Promise.
Returns the resolved value for promises, or the direct result for non-promise values.
Source§fn call_function(
&mut self,
name: &str,
args: &[JsValue],
) -> Result<JsValue, JoltError>
fn call_function( &mut self, name: &str, args: &[JsValue], ) -> Result<JsValue, JoltError>
Call a global function by name.
Source§fn set_global(&mut self, name: &str, value: JsValue) -> Result<(), JoltError>
fn set_global(&mut self, name: &str, value: JsValue) -> Result<(), JoltError>
Set a value on the global object.
Source§fn get_global(&mut self, name: &str) -> Result<JsValue, JoltError>
fn get_global(&mut self, name: &str) -> Result<JsValue, JoltError>
Get a value from the global object.
impl Send for WebRuntime
Auto Trait Implementations§
impl Freeze for WebRuntime
impl !RefUnwindSafe for WebRuntime
impl !Sync for WebRuntime
impl Unpin for WebRuntime
impl UnsafeUnpin for WebRuntime
impl !UnwindSafe for WebRuntime
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