pub enum Runtime<'a> {
Default,
OptSize,
DefaultSync,
OptSizeSync,
Custom(&'a [u8]),
}Expand description
QuickJS runtime variant to embed in the generated component.
Variants§
Default
Standard runtime optimized for speed.
Built with component-model async support when the component-model-async
feature is enabled (the default); otherwise this is the non-async runtime.
OptSize
Runtime optimized for smaller generated components.
Built with component-model async support when the component-model-async
feature is enabled (the default); otherwise this is the non-async runtime.
DefaultSync
Non-async runtime optimized for speed.
Produces components that do not use the component-model async ABI, so they run on hosts without async support. Always available regardless of Cargo features.
OptSizeSync
Non-async runtime optimized for smaller generated components.
Produces components that do not use the component-model async ABI, so they run on hosts without async support. Always available regardless of Cargo features.
Custom(&'a [u8])
Caller-provided runtime Wasm bytes.
Trait Implementations§
impl<'a> Copy for Runtime<'a>
Auto Trait Implementations§
impl<'a> Freeze for Runtime<'a>
impl<'a> RefUnwindSafe for Runtime<'a>
impl<'a> Send for Runtime<'a>
impl<'a> Sync for Runtime<'a>
impl<'a> Unpin for Runtime<'a>
impl<'a> UnsafeUnpin for Runtime<'a>
impl<'a> UnwindSafe for Runtime<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more