pub enum Error {
Http(Error),
Client(HyperClientError),
BodyNotAllowed(Method),
}Variants§
Implementations§
Source§impl Error
impl Error
Sourcepub const fn is_http(&self) -> bool
pub const fn is_http(&self) -> bool
Returns true if this value is of type Http. Returns false otherwise
Sourcepub const fn is_client(&self) -> bool
pub const fn is_client(&self) -> bool
Returns true if this value is of type Client. Returns false otherwise
Sourcepub const fn is_body_not_allowed(&self) -> bool
pub const fn is_body_not_allowed(&self) -> bool
Returns true if this value is of type BodyNotAllowed. Returns false otherwise
Source§impl Error
impl Error
Sourcepub fn try_unwrap_http(self) -> Result<Error, TryUnwrapError<Self>>
pub fn try_unwrap_http(self) -> Result<Error, TryUnwrapError<Self>>
Attempts to unwrap this value to the Error::Http variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_http_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>
pub fn try_unwrap_http_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the Error::Http variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_client(self) -> Result<HyperClientError, TryUnwrapError<Self>>
pub fn try_unwrap_client(self) -> Result<HyperClientError, TryUnwrapError<Self>>
Attempts to unwrap this value to the Error::Client variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_client_ref(
&self,
) -> Result<&HyperClientError, TryUnwrapError<&Self>>
pub fn try_unwrap_client_ref( &self, ) -> Result<&HyperClientError, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the Error::Client variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_body_not_allowed(self) -> Result<Method, TryUnwrapError<Self>>
pub fn try_unwrap_body_not_allowed(self) -> Result<Method, TryUnwrapError<Self>>
Attempts to unwrap this value to the Error::BodyNotAllowed variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_body_not_allowed_ref(
&self,
) -> Result<&Method, TryUnwrapError<&Self>>
pub fn try_unwrap_body_not_allowed_ref( &self, ) -> Result<&Method, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the Error::BodyNotAllowed variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Source§impl Error
impl Error
Sourcepub fn unwrap_http(self) -> Error
pub fn unwrap_http(self) -> Error
Unwraps this value to the Error::Http variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_http_ref(&self) -> &Error
pub fn unwrap_http_ref(&self) -> &Error
Unwraps this reference to the Error::Http variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_client(self) -> HyperClientError
pub fn unwrap_client(self) -> HyperClientError
Unwraps this value to the Error::Client variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_client_ref(&self) -> &HyperClientError
pub fn unwrap_client_ref(&self) -> &HyperClientError
Unwraps this reference to the Error::Client variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_body_not_allowed(self) -> Method
pub fn unwrap_body_not_allowed(self) -> Method
Unwraps this value to the Error::BodyNotAllowed variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_body_not_allowed_ref(&self) -> &Method
pub fn unwrap_body_not_allowed_ref(&self) -> &Method
Unwraps this reference to the Error::BodyNotAllowed variant.
Panics if this value is of any other type.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()