Struct finchers::error::Error [−][src]
pub struct Error(_);
A type which holds a value of HttpError
in a type-erased form.
Methods
impl Error
[src]
impl Error
pub fn is<T: HttpError>(&self) -> bool
[src]
pub fn is<T: HttpError>(&self) -> bool
Returns true
if the type of contained value is the same as T
.
pub fn downcast_ref<T: HttpError>(&self) -> Option<&T>
[src]
pub fn downcast_ref<T: HttpError>(&self) -> Option<&T>
Attempts to downcast the boxed value to a conrete type by reference.
pub fn downcast_mut<T: HttpError>(&mut self) -> Option<&mut T>
[src]
pub fn downcast_mut<T: HttpError>(&mut self) -> Option<&mut T>
Attempts to downcast the boxed value to a conrete type by mutable reference.
pub fn downcast<T: HttpError>(self) -> Result<T>
[src]
pub fn downcast<T: HttpError>(self) -> Result<T>
Attempts to downcast the boxed value to a conrete type.
pub fn status_code(&self) -> StatusCode
[src]
pub fn status_code(&self) -> StatusCode
Return the HTTP status code associated with contained value.
pub fn headers(&self, headers: &mut HeaderMap)
[src]
pub fn headers(&self, headers: &mut HeaderMap)
Append a set of header values to the header map.
pub fn cause(&self) -> Option<&Fail>
[src]
pub fn cause(&self) -> Option<&Fail>
Returns a reference to the underlying cause of contained error value.
Trait Implementations
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<E: HttpError> From<E> for Error
[src]
impl<E: HttpError> From<E> for Error
impl AsRef<HttpError> for Error
[src]
impl AsRef<HttpError> for Error
impl Display for Error
[src]
impl Display 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 Serialize for Error
[src]
impl Serialize for Error