Struct spring_web::error::KnownWebError
source · pub struct KnownWebError { /* private fields */ }
Expand description
Implementations§
source§impl KnownWebError
impl KnownWebError
pub fn new(status_code: StatusCode, msg: &str) -> Self
sourcepub fn ok(msg: &str) -> Self
pub fn ok(msg: &str) -> Self
200 OK [RFC7231, Section 6.3.1]
sourcepub fn created(msg: &str) -> Self
pub fn created(msg: &str) -> Self
201 Created [RFC7231, Section 6.3.2]
sourcepub fn accepted(msg: &str) -> Self
pub fn accepted(msg: &str) -> Self
202 Accepted [RFC7231, Section 6.3.3]
203 Non-Authoritative Information [RFC7231, Section 6.3.4]
sourcepub fn no_content(msg: &str) -> Self
pub fn no_content(msg: &str) -> Self
204 No Content [RFC7231, Section 6.3.5]
sourcepub fn reset_content(msg: &str) -> Self
pub fn reset_content(msg: &str) -> Self
205 Reset Content [RFC7231, Section 6.3.6]
sourcepub fn partial_content(msg: &str) -> Self
pub fn partial_content(msg: &str) -> Self
206 Partial Content [RFC7233, Section 4.1]
sourcepub fn multi_status(msg: &str) -> Self
pub fn multi_status(msg: &str) -> Self
207 Multi-Status [RFC4918]
sourcepub fn already_reported(msg: &str) -> Self
pub fn already_reported(msg: &str) -> Self
208 Already Reported [RFC5842]
sourcepub fn multiple_choices(msg: &str) -> Self
pub fn multiple_choices(msg: &str) -> Self
300 Multiple Choices [RFC7231, Section 6.4.1]
sourcepub fn moved_permanently(msg: &str) -> Self
pub fn moved_permanently(msg: &str) -> Self
301 Moved Permanently [RFC7231, Section 6.4.2]
sourcepub fn found(msg: &str) -> Self
pub fn found(msg: &str) -> Self
302 Found [RFC7231, Section 6.4.3]
sourcepub fn see_other(msg: &str) -> Self
pub fn see_other(msg: &str) -> Self
303 See Other [RFC7231, Section 6.4.4]
sourcepub fn not_modified(msg: &str) -> Self
pub fn not_modified(msg: &str) -> Self
304 Not Modified [RFC7232, Section 4.1]
sourcepub fn use_proxy(msg: &str) -> Self
pub fn use_proxy(msg: &str) -> Self
305 Use Proxy [RFC7231, Section 6.4.5]
sourcepub fn temporary_redirect(msg: &str) -> Self
pub fn temporary_redirect(msg: &str) -> Self
307 Temporary Redirect [RFC7231, Section 6.4.7]
sourcepub fn permanent_redirect(msg: &str) -> Self
pub fn permanent_redirect(msg: &str) -> Self
308 Permanent Redirect [RFC7238]
sourcepub fn bad_request(msg: &str) -> Self
pub fn bad_request(msg: &str) -> Self
400 Bad Request [RFC7231, Section 6.5.1]
401 Unauthorized [RFC7235, Section 3.1]
sourcepub fn payment_required(msg: &str) -> Self
pub fn payment_required(msg: &str) -> Self
402 Payment Required [RFC7231, Section 6.5.2]
sourcepub fn forbidden(msg: &str) -> Self
pub fn forbidden(msg: &str) -> Self
403 Forbidden [RFC7231, Section 6.5.3]
sourcepub fn not_found(msg: &str) -> Self
pub fn not_found(msg: &str) -> Self
404 Not Found [RFC7231, Section 6.5.4]
sourcepub fn method_not_allowed(msg: &str) -> Self
pub fn method_not_allowed(msg: &str) -> Self
405 Method Not Allowed [RFC7231, Section 6.5.5]
sourcepub fn not_acceptable(msg: &str) -> Self
pub fn not_acceptable(msg: &str) -> Self
406 Not Acceptable [RFC7231, Section 6.5.6]
sourcepub fn proxy_authentication_required(msg: &str) -> Self
pub fn proxy_authentication_required(msg: &str) -> Self
407 Proxy Authentication Required [RFC7235, Section 3.2]
sourcepub fn request_timeout(msg: &str) -> Self
pub fn request_timeout(msg: &str) -> Self
408 Request Timeout [RFC7231, Section 6.5.7]
sourcepub fn conflict(msg: &str) -> Self
pub fn conflict(msg: &str) -> Self
409 Conflict [RFC7231, Section 6.5.8]
sourcepub fn gone(msg: &str) -> Self
pub fn gone(msg: &str) -> Self
410 Gone [RFC7231, Section 6.5.9]
sourcepub fn length_required(msg: &str) -> Self
pub fn length_required(msg: &str) -> Self
411 Length Required [RFC7231, Section 6.5.10]
sourcepub fn precondition_failed(msg: &str) -> Self
pub fn precondition_failed(msg: &str) -> Self
412 Precondition Failed [RFC7232, Section 4.2]
sourcepub fn payload_too_large(msg: &str) -> Self
pub fn payload_too_large(msg: &str) -> Self
413 Payload Too Large [RFC7231, Section 6.5.11]
sourcepub fn uri_too_long(msg: &str) -> Self
pub fn uri_too_long(msg: &str) -> Self
414 URI Too Long [RFC7231, Section 6.5.12]
sourcepub fn unsupported_media_type(msg: &str) -> Self
pub fn unsupported_media_type(msg: &str) -> Self
415 Unsupported Media Type [RFC7231, Section 6.5.13]
sourcepub fn range_not_satisfiable(msg: &str) -> Self
pub fn range_not_satisfiable(msg: &str) -> Self
416 Range Not Satisfiable [RFC7233, Section 4.4]
sourcepub fn expectation_failed(msg: &str) -> Self
pub fn expectation_failed(msg: &str) -> Self
417 Expectation Failed [RFC7231, Section 6.5.14]
sourcepub fn im_a_teapot(msg: &str) -> Self
pub fn im_a_teapot(msg: &str) -> Self
418 I’m a teapot [curiously not registered by IANA but RFC2324]
sourcepub fn misdirected_request(msg: &str) -> Self
pub fn misdirected_request(msg: &str) -> Self
421 Misdirected Request RFC7540, Section 9.1.2
sourcepub fn unprocessable_entity(msg: &str) -> Self
pub fn unprocessable_entity(msg: &str) -> Self
422 Unprocessable Entity [RFC4918]
sourcepub fn failed_dependency(msg: &str) -> Self
pub fn failed_dependency(msg: &str) -> Self
424 Failed Dependency [RFC4918]
sourcepub fn upgrade_required(msg: &str) -> Self
pub fn upgrade_required(msg: &str) -> Self
426 Upgrade Required [RFC7231, Section 6.5.15]
sourcepub fn precondition_required(msg: &str) -> Self
pub fn precondition_required(msg: &str) -> Self
428 Precondition Required [RFC6585]
sourcepub fn too_many_requests(msg: &str) -> Self
pub fn too_many_requests(msg: &str) -> Self
429 Too Many Requests [RFC6585]
sourcepub fn request_header_fields_too_large(msg: &str) -> Self
pub fn request_header_fields_too_large(msg: &str) -> Self
431 Request Header Fields Too Large [RFC6585]
451 Unavailable For Legal Reasons [RFC7725]
sourcepub fn internal_server_error(msg: &str) -> Self
pub fn internal_server_error(msg: &str) -> Self
500 Internal Server Error [RFC7231, Section 6.6.1]
sourcepub fn not_implemented(msg: &str) -> Self
pub fn not_implemented(msg: &str) -> Self
501 Not Implemented [RFC7231, Section 6.6.2]
sourcepub fn bad_gateway(msg: &str) -> Self
pub fn bad_gateway(msg: &str) -> Self
502 Bad Gateway [RFC7231, Section 6.6.3]
503 Service Unavailable [RFC7231, Section 6.6.4]
sourcepub fn gateway_timeout(msg: &str) -> Self
pub fn gateway_timeout(msg: &str) -> Self
504 Gateway Timeout [RFC7231, Section 6.6.5]
sourcepub fn http_version_not_supported(msg: &str) -> Self
pub fn http_version_not_supported(msg: &str) -> Self
505 HTTP Version Not Supported [RFC7231, Section 6.6.6]
sourcepub fn variant_also_negotiates(msg: &str) -> Self
pub fn variant_also_negotiates(msg: &str) -> Self
506 Variant Also Negotiates [RFC2295]
sourcepub fn insufficient_storage(msg: &str) -> Self
pub fn insufficient_storage(msg: &str) -> Self
507 Insufficient Storage [RFC4918]
sourcepub fn loop_detected(msg: &str) -> Self
pub fn loop_detected(msg: &str) -> Self
508 Loop Detected [RFC5842]
sourcepub fn not_extended(msg: &str) -> Self
pub fn not_extended(msg: &str) -> Self
510 Not Extended [RFC2774]
sourcepub fn network_authentication_required(msg: &str) -> Self
pub fn network_authentication_required(msg: &str) -> Self
511 Network Authentication Required [RFC6585]
Trait Implementations§
source§impl Debug for KnownWebError
impl Debug for KnownWebError
source§impl Display for KnownWebError
impl Display for KnownWebError
source§impl Error for KnownWebError
impl Error for KnownWebError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<KnownWebError> for WebError
impl From<KnownWebError> for WebError
source§fn from(source: KnownWebError) -> Self
fn from(source: KnownWebError) -> Self
Auto Trait Implementations§
impl Freeze for KnownWebError
impl RefUnwindSafe for KnownWebError
impl Send for KnownWebError
impl Sync for KnownWebError
impl Unpin for KnownWebError
impl UnwindSafe for KnownWebError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.