Enum WasmCommunicationError
pub enum WasmCommunicationError {
Js(String),
Lagged(u64),
Closed,
}Expand description
Error type for the WASM communication backend’s send and receive operations.
Distinguishes recoverable failures (which leave the shared IPC client running) from the fatal closed-channel state. Without this distinction the client’s processing loop would treat a permanently-closed broadcast channel as recoverable and busy-loop on it, since a closed channel returns an error immediately and forever without ever awaiting.
Variants§
Js(String)
An error returned by the JavaScript backend (e.g. a failed send). Recoverable: the IPC client keeps running so future operations can succeed.
Lagged(u64)
The incoming message receiver fell behind and 0 messages were dropped. Recoverable: the
next receive resumes normally.
Closed
The communication channel was closed because all senders were dropped. This is fatal: the IPC client’s processing loop stops cleanly instead of busy-looping on the closed channel.
Trait Implementations§
§impl Debug for WasmCommunicationError
impl Debug for WasmCommunicationError
§impl Display for WasmCommunicationError
impl Display for WasmCommunicationError
§impl Error for WasmCommunicationError
impl Error for WasmCommunicationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
§impl IpcErrorKind for WasmCommunicationError
impl IpcErrorKind for WasmCommunicationError
Auto Trait Implementations§
impl Freeze for WasmCommunicationError
impl RefUnwindSafe for WasmCommunicationError
impl Send for WasmCommunicationError
impl Sync for WasmCommunicationError
impl Unpin for WasmCommunicationError
impl UnsafeUnpin for WasmCommunicationError
impl UnwindSafe for WasmCommunicationError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more§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> 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