pub enum ControlError {
NoSuchSession(SessionId),
NoSuchWindow(WindowId),
NoSuchPane(PaneId),
Transport(String),
Rejected(String),
Unsupported {
capability: &'static str,
detail: String,
},
Internal(Error),
}Expand description
Failure modes a MultiplexerControl op can return. Variants
stay narrow so consumers can pattern-match on the recoverable
vs not-recoverable ones (e.g. RPC retries on Transport but
gives up on NoSuchSession).
Variants§
NoSuchSession(SessionId)
NoSuchWindow(WindowId)
NoSuchPane(PaneId)
Transport(String)
Rejected(String)
Unsupported
The backend on the other end of the wire does not implement a
named crate::capability::Capability this call needs.
Raised client-side, before the request goes out — the
point is to refuse legibly instead of sending a frame the
daemon will decode successfully and then silently ignore
part of. capability is the wire name ("spawn-args"), so
a caller can match on it without string-scraping detail.
Deliberately has no crate::wire::WireError mirror:
adding a WireError variant would be a wire change that
older clients could not decode, and this error is never
produced by a daemon. If one ever needs to, it degrades to
Rejected on the wire (see the From impl in wire.rs).
Internal(Error)
Trait Implementations§
Source§impl Debug for ControlError
impl Debug for ControlError
Source§impl Display for ControlError
impl Display for ControlError
Source§impl Error for ControlError
impl Error for ControlError
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()