[][src]Struct tower_web::error::ErrorKind

pub struct ErrorKind { /* fields omitted */ }

A list specifying the general categories of Tower Web errors.

Methods

impl ErrorKind[src]

pub fn bad_request() -> ErrorKind[src]

Deprecated:

please use 'Error::from(http::StatusCode::BAD_REQUEST)' instead

Returns a new ErrorKind value representing a 400 -- bad request error.

pub fn is_bad_request(&self) -> bool[src]

Deprecated:

please use 'kind() == http::StatusCode::BAD_REQUEST' instead

Returns true if self represents a 400 -- bad request error

pub fn unauthorized() -> ErrorKind[src]

Deprecated:

please use 'Error::from(http::StatusCode::UNAUTHORIZED)' instead

Returns a new ErrorKind value representing a 401 -- unauthorized error.

pub fn forbidden() -> ErrorKind[src]

Deprecated:

please use 'Error::from(http::StatusCode::FORBIDDEN)' instead

Returns a new ErrorKind value representing a 403 -- forbidden error.

pub fn not_found() -> ErrorKind[src]

Deprecated:

please use 'Error::from(http::StatusCode::NOT_FOUND)' instead

Returns a new ErrorKind value representing a 404 -- not found error

pub fn is_not_found(&self) -> bool[src]

Deprecated:

please use 'kind() == http::StatusCode::NOT_FOUND' instead

Returns true if self represents a 404 -- not found error

pub fn unprocessable_entity() -> ErrorKind[src]

Deprecated:

please use 'Error::from(http::StatusCode::UNPROCESSABLE_ENTITY)' instead

Returns a new ErrorKind value representing a 422 -- unprocessable entity error

pub fn internal() -> ErrorKind[src]

Deprecated:

please use 'Error::from(http::StatusCode::INTERNAL_SERVER_ERROR)' instead

Returns a new ErrorKind value representing 500 -- internal server error.

pub fn is_internal(&self) -> bool[src]

Deprecated:

please use 'kind() == http::StatusCode::INTERNAL_SERVER_ERROR' instead

Returns true if self represents a 500 -- internal server error.

Trait Implementations

impl From<ErrorKind> for Error[src]

impl Debug for ErrorKind[src]

Auto Trait Implementations

impl Send for ErrorKind

impl Sync for ErrorKind

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?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

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

impl<T> Erased for T