pub enum EngineError {
Transport {
socket: PathBuf,
source: Box<UdsRpcError>,
},
NoDaemon {
socket: PathBuf,
},
StreamClosed {
socket: PathBuf,
},
Malformed(String),
Rpc {
code: i32,
message: String,
data: Option<Value>,
},
NoSession,
}Expand description
See module docs.
Variants§
Transport
The socket could not be dialled, written to, or read from — including
the hardening checks connect_hardened runs before a byte is written.
Boxed because UdsRpcError carries a PathBuf and a boxed
response of its own, and clippy’s result_large_err reads the unboxed
enum as too large to return by value.
NoDaemon
No daemon is answering on the socket, and this client will not start
one — the caller (tcode tui’s auto-spawn) decides that.
StreamClosed
The daemon closed an event stream before this client observed a
terminal event (SessionDone/SessionCancelled) — and every reconnect
attempt (bounded by SESSION_STREAM_MAX_RECONNECTS) hit the same
premature close. Distinct from Self::Transport: nothing about the
individual dial failed, only the STREAM never reached a terminal state.
Malformed(String)
The daemon’s response body didn’t have the shape this client expected
(e.g. session.create’s result missing an id field) — a
daemon/client version-skew symptom, not a transport failure.
Rpc
The daemon’s JSON-RPC error envelope (verbatim: code + message +
optional data).
Fields
NoSession
handle_input/cancel_session was called before setup minted a
session (or after a session was never successfully created) — a
caller-sequencing error, never a transport failure.
Trait Implementations§
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
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 !RefUnwindSafe for EngineError
impl !UnwindSafe for EngineError
impl Freeze for EngineError
impl Send for EngineError
impl Sync for EngineError
impl Unpin for EngineError
impl UnsafeUnpin for EngineError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more