Enum httpstatus::StatusCode
[−]
[src]
pub enum StatusCode { Continue, SwitchingProtocols, Processing, EarlyHints, Ok, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultiStatus, AlreadyReported, IMUsed, MultipleChoices, MovedPermanently, Found, SeeOther, NotModified, UseProxy, SwitchProxy, TemporaryRedirect, PermanentRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, PreconditionFailed, PayloadTooLarge, UriTooLong, UnsupportedMediaType, RangeNotSatisfiable, ExpectationFailed, ImATeapot, MisdirectedRequest, UnprocessableEntity, Locked, FailedDependency, UpgradeRequired, PreconditionRequired, TooManyRequests, RequestHeaderFieldsTooLarge, UnavailableForLegalReasons, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, HttpVersionNotSupported, VariantAlsoNegotiates, InsufficientStorage, LoopDetected, NotExtended, NetworkAuthenticationRequired, Unknown(u16), }
Represents an HTTP status code
Variants
Continue
100 Continue (RFC 7231)
SwitchingProtocols
101 Switching Protocols (RFC 7231)
Processing
102 Processing (RFC 2518)
EarlyHints
103 Early Hints (RFC 8297)
Ok
200 OK (RFC 7231)
Created
201 Created (RFC 7231)
Accepted
202 Accepted (RFC 7231)
NonAuthoritativeInformation
203 Non-Authoritative Information (RFC 7231)
NoContent
204 No Content (RFC 7231)
ResetContent
205 Reset Content (RFC 7231)
PartialContent
206 Partial Content (RFC 7233)
MultiStatus
207 Multi-Status (RFC 4918)
AlreadyReported
208 Already Reported (RFC 5842)
IMUsed
226 IM Used (RFC 3229)
MultipleChoices
300 Multiple Choices (RFC 7231)
MovedPermanently
301 Moved Permanently (RFC 7231)
Found
302 Found (RFC 7231)
SeeOther
303 See Other (RFC 7231)
NotModified
304 Not Modified (RFC 7232)
UseProxy
305 Use Proxy (RFC 7231)
SwitchProxy
306 Switch Proxy (RFC 7231)
TemporaryRedirect
307 Temporary Redirect (RFC 7231)
PermanentRedirect
308 Permanent Redirect (RFC 7538)
BadRequest
400 Bad Request (RFC 7231)
401 Unauthorized (RFC 7235)
PaymentRequired
402 Payment Required (RFC 7231)
Forbidden
403 Forbidden (RFC 7231)
NotFound
404 Not Found (RFC 7231)
MethodNotAllowed
405 Method Not Allowed (RFC 7231)
NotAcceptable
406 Not Acceptable (RFC 7231)
ProxyAuthenticationRequired
407 Proxy Authentication Required (RFC 7235)
RequestTimeout
408 Request Timeout (RFC 7231)
Conflict
409 Conflict (RFC 7231)
Gone
410 Gone (RFC 7231)
LengthRequired
411 Length Required (RFC 7231)
PreconditionFailed
412 Precondition Failed (RFC 7232)
PayloadTooLarge
413 Payload Too Large (RFC 7231)
UriTooLong
414 URI Too Long (RFC 7231)
UnsupportedMediaType
415 Unsupported Media Type (RFC 7231)
RangeNotSatisfiable
416 Range Not Satisfiable (RFC 7233)
ExpectationFailed
417 Expectation Failed (RFC 7231)
ImATeapot
418 I'm a teapot (RFC 2324)
MisdirectedRequest
421 Misdirected Request (RFC 7540)
UnprocessableEntity
422 Unprocessable Entity (RFC 4918)
Locked
423 Locked (RFC 4918)
FailedDependency
424 Failed Dependency (RFC 4918)
UpgradeRequired
426 Upgrade Required (RFC 7231)
PreconditionRequired
428 Precondition Required (RFC 6585)
TooManyRequests
429 Too Many Requests (RFC 6585)
RequestHeaderFieldsTooLarge
431 Request Header Fields Too Large (RFC 6585)
451 Unavailable For Legal Reasons (RFC 7725)
InternalServerError
500 Internal Server Error (RFC 7231)
NotImplemented
501 Not Implemented (RFC 7231)
BadGateway
502 Bad Gateway (RFC 7231)
503 Service Unavailable (RFC 7231)
GatewayTimeout
504 Gateway Timeout (RFC 7231)
HttpVersionNotSupported
505 HTTP Version Not Supported (RFC 7231)
VariantAlsoNegotiates
506 Variant Also Negotiates (RFC 2295)
InsufficientStorage
507 Insufficient Storage (RFC 4918)
LoopDetected
508 Loop Detected (RFC 5842)
NotExtended
510 Not Extended (RFC 2774)
NetworkAuthenticationRequired
511 Network Authentication Required (RFC 6585)
Unknown(u16)
Unknown status code
Methods
impl StatusCode
[src]
fn as_u16(&self) -> u16
[src]
Returns the numeric status code
fn reason_phrase(&self) -> &'static str
[src]
Returns the reason phrase of HTTP status code
fn class(&self) -> StatusClass
[src]
Returns the status class of status code
Trait Implementations
impl Debug for StatusCode
[src]
impl Eq for StatusCode
[src]
impl PartialEq for StatusCode
[src]
fn eq(&self, __arg_0: &StatusCode) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &StatusCode) -> bool
[src]
This method tests for !=
.
impl Ord for StatusCode
[src]
fn cmp(&self, __arg_0: &StatusCode) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for StatusCode
[src]
fn partial_cmp(&self, __arg_0: &StatusCode) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &StatusCode) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &StatusCode) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &StatusCode) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &StatusCode) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Clone for StatusCode
[src]
fn clone(&self) -> StatusCode
[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 Hash for StatusCode
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more