Struct auraescript::auraescript
source · pub struct auraescript {}
Expand description
An extension for use with the Deno JS runtime. To use it, provide it as an argument when instantiating your runtime:
use deno_core::{ JsRuntime, RuntimeOptions };
let mut extensions = vec![auraescript::init_ops_and_esm()];
let mut js_runtime = JsRuntime::new(RuntimeOptions {
extensions,
..Default::default()
});
Implementations§
source§impl auraescript
impl auraescript
sourcepub fn init_js_only() -> Extension
👎Deprecated since 0.216.0: please use init_ops_and_esm
or init_ops
instead
pub fn init_js_only() -> Extension
init_ops_and_esm
or init_ops
insteadLegacy function for extension instantiation.
Please use init_ops_and_esm
or init_ops
instead
Returns
an Extension object that can be used during instantiation of a JsRuntime
sourcepub fn init_ops_and_esm() -> Extension
pub fn init_ops_and_esm() -> Extension
Initialize this extension for runtime or snapshot creation. Use this
function if the runtime or snapshot is not created from a (separate)
snapshot, or that snapshot does not contain this extension. Otherwise
use init_ops()
instead.
Returns
an Extension object that can be used during instantiation of a JsRuntime
sourcepub fn init_ops() -> Extension
pub fn init_ops() -> Extension
Initialize this extension for runtime or snapshot creation, excluding its JavaScript sources and evaluation. This is used when the runtime or snapshot is created from a (separate) snapshot which includes this extension in order to avoid evaluating the JavaScript twice.
Returns
an Extension object that can be used during instantiation of a JsRuntime
Auto Trait Implementations§
impl RefUnwindSafe for auraescript
impl Send for auraescript
impl Sync for auraescript
impl Unpin for auraescript
impl UnwindSafe for auraescript
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request