pub struct QuickjsRuntimeFacadeInner { /* private fields */ }

Implementations

this can be used to run a function in the event_queue thread for the QuickJSRuntime without borrowing the q_js_rt

this is how you add a closure to the worker thread which has an instance of the QuickJsRuntime this will run asynchronously

example
use quickjs_runtime::builder::QuickJsRuntimeBuilder;
let rt = QuickJsRuntimeBuilder::new().build();
rt.add_rt_task_to_event_loop(|q_js_rt| {
    // here you are in the worker thread and you can use the quickjs_utils
    q_js_rt.gc();
});

Trait Implementations

run a closure in the EventLoop with a &JsRuntimeAdapter as only param and await the result blocking

run a closure in the EventLoop with a &JsRuntimeAdapter as only param and return a future which will fulfill after the closure has been called

run a closure in the EventLoop with a &JsRuntimeAdapter as only param

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.