[][src]Struct tsukuyomi::error::Error

pub struct Error { /* fields omitted */ }

A type that contains arbitrary HTTP error values.

Methods

impl Error[src]

pub fn status_code(&self) -> StatusCode[src]

Returns an HTTP status code associated with the underlying error value.

pub fn to_response(&self) -> Response<()>[src]

Creates an HTTP response from the underlying error value.

pub fn downcast<T: HttpError>(self) -> Result<T>[src]

Attempts to downcast the underlying error value into the specified concrete type.

pub fn downcast_ref<T: HttpError>(&self) -> Option<&T>[src]

Attempts to downcast the underlying error value into the specified concrete type as a reference.

Trait Implementations

impl<E> From<E> for Error where
    E: HttpError
[src]

impl From<StatusCode> for Error[src]

impl From<Box<dyn Error + 'static + Sync + Send>> for Error[src]

impl Debug for Error[src]

impl Display for Error[src]

impl AsFail for Error[src]

impl IntoResponse for Error[src]

Auto Trait Implementations

impl Send for Error

impl Sync for Error

Blanket Implementations

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

impl<T> Responder for T where
    T: IntoResponse
[src]

type Upgrade = NeverUpgrade

The type of asynchronous object to be ran after upgrading the protocol.

type Error = Never

The error type that will be thrown by this responder.

type Respond = IntoResponseRespond<T>

The asynchronous task converted from this responder.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsFail for T where
    T: Fail, 

impl<T> Erased for T