pub struct BrowserRuntime { /* private fields */ }Expand description
Dispatcher-backed preview runtime for Rust-authored browser consumers.
This is intentionally narrower than the native Runtime: it provides a
truthful browser entrypoint over the wasm ABI dispatcher instead of
pretending the browser already has full native-thread runtime parity.
Implementations§
Source§impl BrowserRuntime
impl BrowserRuntime
Sourcepub fn runtime_handle(&self) -> WasmHandleRef
pub fn runtime_handle(&self) -> WasmHandleRef
Returns the browser runtime handle exported through the wasm dispatcher.
Sourcepub fn consumer_version(&self) -> Option<WasmAbiVersion>
pub fn consumer_version(&self) -> Option<WasmAbiVersion>
Returns the consumer ABI version used for boundary calls, if pinned.
Sourcepub fn execution_ladder(&self) -> &BrowserExecutionLadderDiagnostics
pub fn execution_ladder(&self) -> &BrowserExecutionLadderDiagnostics
Returns the execution-ladder diagnostics used to select this runtime.
Sourcepub fn dispatcher_diagnostics(&self) -> WasmDispatcherDiagnostics
pub fn dispatcher_diagnostics(&self) -> WasmDispatcherDiagnostics
Returns a snapshot of dispatcher state for leak detection and observability.
Sourcepub fn enter_scope(
&self,
label: Option<&str>,
) -> Result<WasmHandleRef, WasmDispatchError>
pub fn enter_scope( &self, label: Option<&str>, ) -> Result<WasmHandleRef, WasmDispatchError>
Enters a child scope beneath the runtime handle.
Sourcepub fn close_scope(
&self,
scope: &WasmHandleRef,
) -> Result<WasmAbiOutcomeEnvelope, WasmDispatchError>
pub fn close_scope( &self, scope: &WasmHandleRef, ) -> Result<WasmAbiOutcomeEnvelope, WasmDispatchError>
Closes a previously entered child scope.
Sourcepub fn close(&self) -> Result<WasmAbiOutcomeEnvelope, WasmDispatchError>
pub fn close(&self) -> Result<WasmAbiOutcomeEnvelope, WasmDispatchError>
Closes the runtime and drains all remaining child handles.
Trait Implementations§
Source§impl Clone for BrowserRuntime
impl Clone for BrowserRuntime
Source§fn clone(&self) -> BrowserRuntime
fn clone(&self) -> BrowserRuntime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for BrowserRuntime
impl !Send for BrowserRuntime
impl !Sync for BrowserRuntime
impl !UnwindSafe for BrowserRuntime
impl Freeze for BrowserRuntime
impl Unpin for BrowserRuntime
impl UnsafeUnpin for BrowserRuntime
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
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).