Struct ntex::web::error::DefaultError[][src]

pub struct DefaultError;
Expand description

Default error type

Trait Implementations

impl Clone for DefaultError[src]

fn clone(&self) -> DefaultError[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for DefaultError[src]

fn default() -> DefaultError[src]

Returns the “default value” for a type. Read more

impl ErrorRenderer for DefaultError[src]

impl<E: WebResponseError<DefaultError>> WebResponseError<DefaultError> for TimeoutError<E>[src]

Return GATEWAY_TIMEOUT for TimeoutError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for DataExtractorError[src]

InternalServerError for DataExtractorError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for HttpError[src]

Return InternalServerError for HttpError, Response generation can return HttpError, so it is internal error

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for Error[src]

Return InternalServerError for io::Error

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for UrlGenerationError[src]

InternalServerError for UrlGeneratorError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for UrlencodedError[src]

Response renderer for UrlencodedError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for JsonPayloadError[src]

Return BadRequest for JsonPayloadError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for PathError[src]

Error renderer for PathError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for QueryPayloadError[src]

Error renderer QueryPayloadError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for PayloadError[src]

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for PayloadError[src]

PayloadError returns two possible results:

  • Overflow returns PayloadTooLarge
  • Other errors returns BadRequest

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for ParseError[src]

Return BadRequest for cookie::ParseError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for JsonError[src]

InternalServerError for JsonError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for ContentTypeError[src]

Return BadRequest for ContentTypeError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for SendRequestError[src]

Convert SendRequestError to a server Response

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for HandshakeError[src]

Error renderer for ws::HandshakeError

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

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

Response’s status code Read more

impl WebResponseError<DefaultError> for FormError[src]

InternalServerError for FormError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for SslError[src]

InternalServerError for openssl::ssl::Error

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl<T: Debug + 'static> WebResponseError<DefaultError> for HandshakeError<T>[src]

InternalServerError for openssl::ssl::HandshakeError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for DeError[src]

Return BAD_REQUEST for de::value::Error

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for Canceled[src]

InternalServerError for Canceled

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl<E: Debug + 'static> WebResponseError<DefaultError> for BlockingError<E>[src]

InternalServerError for BlockingError

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl WebResponseError<DefaultError> for Utf8Error[src]

Return BAD_REQUEST for Utf8Error

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

Response’s status code Read more

fn error_response(&self, _: &HttpRequest) -> HttpResponse[src]

Generate response for error Read more

impl Copy for DefaultError[src]

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.