Skip to main content

IpcErrorKind

Trait IpcErrorKind 

Source
pub trait IpcErrorKind {
    // Required method
    fn kind(&self) -> ErrorKind;
}
Expand description

Classifies an IPC error into an ErrorKind.

The IPC client runs a single long-lived processing loop that is shared across every peer and every message. Historically any transport or crypto error tore that loop down, which meant a single transient failure (a handshake timeout, a peer disconnecting mid-send, a malformed frame) permanently disabled the shared client and it never recovered.

This trait lets each layer classify its own errors so the client can distinguish the cases:

Implementations should classify errors at construction, where the most context is available, and default ambiguous cases to ErrorKind::Other. Failing open keeps the shared client alive, which is almost always the safer choice.

Required Methods§

Source

fn kind(&self) -> ErrorKind

Classifies the error so the IPC client can decide whether to stop the processing loop or keep running.

Implementations on Foreign Types§

Source§

impl IpcErrorKind for Infallible

Source§

fn kind(&self) -> ErrorKind

Source§

impl IpcErrorKind for ()

Available on crate features test-support only.
Source§

fn kind(&self) -> ErrorKind

Implementors§