pub enum WasmCommunicationError {
Js(String),
Lagged(u64),
Unreachable,
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.
Unreachable
The destination is not reachable: the JS backend reported “Destination unreachable” (e.g. the desktop app is not connected).
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()
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§
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