pub struct HandlerRuntime {}Expand description
The WebAssembly handler runtime: the shared engine plus the per-site binding
backends. Cheap to clone (it is an Arc inside). Without the handlers
feature it is an empty placeholder, so the serving signatures stay uniform —
pass HandlerRuntime::disabled.
Implementations§
Source§impl HandlerRuntime
impl HandlerRuntime
Sourcepub fn disabled() -> Self
pub fn disabled() -> Self
An empty runtime — handler dispatch disabled (the static path is unchanged).
Sourcepub async fn precompile_component(
&self,
hash: &str,
wasm: &[u8],
) -> Result<(), String>
pub async fn precompile_component( &self, hash: &str, wasm: &[u8], ) -> Result<(), String>
Precompile an uploaded component blob to warm the compiled-module cache (deploy-resilience #1a), so a later deploy-time introspection / first request finds a cache hit instead of paying a cold cranelift compile on the critical path. Runs no guest code (compile + pre-instantiate only) and is best-effort + concurrency-gated (#2). Always callable; a no-op when this node has no wasm engine. A component that fails to compile is simply not warmed — the deploy that later activates it is the authority that rejects it.
Trait Implementations§
Source§impl Clone for HandlerRuntime
impl Clone for HandlerRuntime
Source§fn clone(&self) -> HandlerRuntime
fn clone(&self) -> HandlerRuntime
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for HandlerRuntime
impl Default for HandlerRuntime
Source§fn default() -> HandlerRuntime
fn default() -> HandlerRuntime
Auto Trait Implementations§
impl Freeze for HandlerRuntime
impl RefUnwindSafe for HandlerRuntime
impl Send for HandlerRuntime
impl Sync for HandlerRuntime
impl Unpin for HandlerRuntime
impl UnsafeUnpin for HandlerRuntime
impl UnwindSafe for HandlerRuntime
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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