pub enum Error {
Document(DocumentError),
Drift(DriftError),
Values(ValueError),
Request(Error),
Encode(Error),
Transport(Box<dyn Error + Send + Sync>),
Status {
status: StatusCode,
body: String,
},
Decode {
source: Error,
raw: String,
},
}Expand description
Anything that stops a call short of a typed answer.
Variants§
Document(DocumentError)
Drift(DriftError)
Values(ValueError)
Request(Error)
Encode(Error)
Transport(Box<dyn Error + Send + Sync>)
The client refused the request or never got an answer, carrying the error the client itself returned.
Boxed, so this type does not grow a parameter for the client. Whether
the request left is a reading only an adapter can make, so it belongs
above the seam, and a failure nobody has classified is one that may have
arrived. The concrete error is here to be read: downcast_ref recovers
C::Error, and Call::request hands back the bytes for a caller who
would rather send them through the client’s own send and box nothing.
docs/client.md shows both.
Status
Decode
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<DocumentError> for Error
impl From<DocumentError> for Error
Source§fn from(source: DocumentError) -> Self
fn from(source: DocumentError) -> Self
Converts to this type from the input type.
Source§impl From<DriftError> for Error
impl From<DriftError> for Error
Source§fn from(source: DriftError) -> Self
fn from(source: DriftError) -> Self
Converts to this type from the input type.
Source§impl From<ValueError> for Error
impl From<ValueError> for Error
Source§fn from(source: ValueError) -> Self
fn from(source: ValueError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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