#[non_exhaustive]pub enum ClientError {
Unavailable(String),
Protocol(String),
Refused(Box<ErrorReport>),
Operation(Box<ErrorReport>),
Busy {
version: String,
pid: u32,
operations: Vec<OperationId>,
},
Version {
client: String,
service: String,
},
Io(Error),
Unanswered,
}Expand description
Why a client call failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
No service answered for the home, and none could be started.
Protocol(String)
A frame the other side can’t read, or a protocol the service doesn’t speak.
Refused(Box<ErrorReport>)
The service refused the request: the runner’s report of why (boxed: it is large, and rare).
Operation(Box<ErrorReport>)
The operation failed (its error event’s report), or was cancelled.
Busy
The home’s service is another release and has operations queued or running: it was left
running (Client::connect_exact).
Fields
operations: Vec<OperationId>Its operations queued or running, oldest first.
Version
The service started is another release than this client.
Io(Error)
Reading or writing the connection failed.
Unanswered
The request was sent, but the connection ended before the service answered it: whether the service acted on it is unknown (an operation may have been queued).
Implementations§
Source§impl ClientError
impl ClientError
Sourcepub fn is_broken(&self) -> bool
pub fn is_broken(&self) -> bool
Whether it says the connection is gone (the service was killed or restarted, the
connection broke, none answers), rather than an answer of the service’s: a call worth one
more try on a new connection (Pool::call). An operation sent but
unanswered (ClientError::Unanswered) may have been queued: it is followed again
(Pool::follow), not sent again.
Sourcepub fn report(&self) -> Option<&ErrorReport>
pub fn report(&self) -> Option<&ErrorReport>
The runner’s report of the failure, when the service or the operation gave one.
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
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()