pub enum ClientError {
Unavailable(String),
Http(String),
Api {
status: u16,
message: String,
},
SchemaMismatch {
expected: u32,
actual: u32,
},
Decode(String),
Io(Error),
}Expand description
Errors returned by Client operations.
Variants§
The daemon could not be reached or spawned within the connect budget.
Carries a human-readable explanation (e.g. “spawner failed” or “socket never appeared within 1s”).
Http(String)
A transport-level failure talking HTTP/1 over the socket (hyper).
Api
The daemon returned a non-2xx response. The message is the daemon’s
{ "error": "<msg>" } body when present, else the raw body or a status
phrase.
Fields
SchemaMismatch
The daemon’s reported schemaVersion does not match the version this
client was built/configured to expect. Fail loud rather than risk
silent contract drift.
Fields
Decode(String)
A 2xx response body could not be decoded into the expected type.
Io(Error)
A low-level I/O error (socket connect, spawn) not otherwise classified.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ClientError> for SpoolError
impl From<ClientError> for SpoolError
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ClientError
impl !UnwindSafe for ClientError
impl Freeze for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
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
Mutably borrows from an owned value. Read more