Enum anterofit::error::Error [−]
pub enum Error { Hyper(HyperError), Url(UrlError), Serialize(Box<StdError + Send + 'static>), Deserialize(Box<StdError + Send + 'static>), StdIo(IoError), Multipart(MultipartError), NoSerialize(NoSerializeError), Other(Box<StdError + Send + 'static>), Panic(RequestPanicked), UnknownPanic, ResultTaken, }
The error type for this crate.
Can be converted from basically any error returned by any crate used here.
Variants
Hyper(HyperError)
Error type from the hyper
crate.
Associated with errors from connection issues or I/O issues with sockets.
Url(UrlError)
Error type from the url
crate.
Associated with errors with URL string parsing or concatenation.
Serialize(Box<StdError + Send + 'static>)
Errors that occur during serialization.
Deserialize(Box<StdError + Send + 'static>)
Errors that occur during deserialization.
StdIo(IoError)
The std::io::Error
type.
Associated with miscellaneous errors dealing with I/O streams.
Multipart(MultipartError)
Error type from the multipart
crate.
Associated with errors writing out multipart/form-data
requests.
NoSerialize(NoSerializeError)
Returned when a service method requests (de)serialization, but no (de)serializer was provided.
Check the error description for which.
Other(Box<StdError + Send + 'static>)
The miscellaneous error type, can be anything.
Panic(RequestPanicked)
Error returned when a panic occurred while completing a request.
The request head is provided for inspection.
UnknownPanic
A Request
callback (on_complete()
or on_request()
) panicked.
ResultTaken
Returned by methods on Call
if the result was already taken.
Methods
impl Error
[src]
impl Error
pub fn map_serialize<T, E: StdError + Send + 'static>(
res: Result<T, E>
) -> Result<T, Self>
[src]
pub fn map_serialize<T, E: StdError + Send + 'static>(
res: Result<T, E>
) -> Result<T, Self>
Map the result, boxing and wrapping the error as Error::Serialize
pub fn map_deserialize<T, E: StdError + Send + 'static>(
res: Result<T, E>
) -> Result<T, Self>
[src]
pub fn map_deserialize<T, E: StdError + Send + 'static>(
res: Result<T, E>
) -> Result<T, Self>
Map the result, boxing and wrapping the error as Error::Deserialize
pub fn deserialize<E: Into<Box<StdError + Send + Sync + 'static>>>(
err: E
) -> Self
[src]
pub fn deserialize<E: Into<Box<StdError + Send + Sync + 'static>>>(
err: E
) -> Self
Create a value of Error::Deserialize
Trait Implementations
impl Error for Error
[src]
impl Error for Error
fn custom<T: Display>(msg: T) -> Self
[src]
fn custom<T: Display>(msg: T) -> Self
Raised when there is general error when deserializing a type. Read more
fn invalid_type(unexp: Unexpected, exp: &Expected) -> Self
[src]
fn invalid_type(unexp: Unexpected, exp: &Expected) -> Self
Raised when a Deserialize
receives a type different from what it was expecting. Read more
fn invalid_value(unexp: Unexpected, exp: &Expected) -> Self
[src]
fn invalid_value(unexp: Unexpected, exp: &Expected) -> Self
Raised when a Deserialize
receives a value of the right type but that is wrong for some other reason. Read more
fn invalid_length(len: usize, exp: &Expected) -> Self
[src]
fn invalid_length(len: usize, exp: &Expected) -> Self
Raised when deserializing a sequence or map and the input data contains too many or too few elements. Read more
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
[src]
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Raised when a Deserialize
enum type received a variant with an unrecognized name. Read more
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
[src]
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Raised when a Deserialize
struct type received a field with an unrecognized name. Read more
fn missing_field(field: &'static str) -> Self
[src]
fn missing_field(field: &'static str) -> Self
Raised when a Deserialize
struct type expected to receive a required field with a particular name but that field was not present in the input. Read more
fn duplicate_field(field: &'static str) -> Self
[src]
fn duplicate_field(field: &'static str) -> Self
Raised when a Deserialize
struct type received more than one of the same field. Read more
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for Error
impl Display for Error
impl Error for Error
impl Error for Error
fn description(&self) -> &str
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<HyperError> for Error
impl From<HyperError> for Error
fn from(e: HyperError) -> Error
fn from(e: HyperError) -> Error
Performs the conversion.
impl From<UrlError> for Error
impl From<UrlError> for Error
impl From<IoError> for Error
impl From<IoError> for Error
impl From<MultipartError> for Error
impl From<MultipartError> for Error
fn from(e: MultipartError) -> Error
fn from(e: MultipartError) -> Error
Performs the conversion.
impl From<NoSerializeError> for Error
impl From<NoSerializeError> for Error
fn from(e: NoSerializeError) -> Error
fn from(e: NoSerializeError) -> Error
Performs the conversion.
impl From<Box<StdError + Send + 'static>> for Error
impl From<Box<StdError + Send + 'static>> for Error
impl From<RequestPanicked> for Error
impl From<RequestPanicked> for Error
fn from(e: RequestPanicked) -> Error
fn from(e: RequestPanicked) -> Error
Performs the conversion.
impl From<Canceled> for Error
impl From<Canceled> for Error