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§
Source§impl Debug for WasmCommunicationError
impl Debug for WasmCommunicationError
Source§impl Display for WasmCommunicationError
impl Display for WasmCommunicationError
Source§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()