[−][src]Struct tsukuyomi::error::Error
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]
E: HttpError,
impl From<StatusCode> for Error
[src]
fn from(status: StatusCode) -> Self
[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]
fn into_response(self) -> Response
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
impl<T> Responder for T where
T: IntoResponse,
[src]
T: IntoResponse,
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.
fn respond(Self) -> <T as Responder>::Respond
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
impl<T> AsFail for T where
T: Fail,
T: Fail,