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

100 Continue (RFC 7231)

101 Switching Protocols (RFC 7231)

102 Processing (RFC 2518)

103 Early Hints (RFC 8297)

200 OK (RFC 7231)

201 Created (RFC 7231)

202 Accepted (RFC 7231)

203 Non-Authoritative Information (RFC 7231)

204 No Content (RFC 7231)

205 Reset Content (RFC 7231)

206 Partial Content (RFC 7233)

207 Multi-Status (RFC 4918)

208 Already Reported (RFC 5842)

226 IM Used (RFC 3229)

300 Multiple Choices (RFC 7231)

301 Moved Permanently (RFC 7231)

302 Found (RFC 7231)

303 See Other (RFC 7231)

304 Not Modified (RFC 7232)

305 Use Proxy (RFC 7231)

306 Switch Proxy (RFC 7231)

307 Temporary Redirect (RFC 7231)

308 Permanent Redirect (RFC 7538)

400 Bad Request (RFC 7231)

401 Unauthorized (RFC 7235)

402 Payment Required (RFC 7231)

403 Forbidden (RFC 7231)

404 Not Found (RFC 7231)

405 Method Not Allowed (RFC 7231)

406 Not Acceptable (RFC 7231)

407 Proxy Authentication Required (RFC 7235)

408 Request Timeout (RFC 7231)

409 Conflict (RFC 7231)

410 Gone (RFC 7231)

411 Length Required (RFC 7231)

412 Precondition Failed (RFC 7232)

413 Payload Too Large (RFC 7231)

414 URI Too Long (RFC 7231)

415 Unsupported Media Type (RFC 7231)

416 Range Not Satisfiable (RFC 7233)

417 Expectation Failed (RFC 7231)

418 I'm a teapot (RFC 2324)

421 Misdirected Request (RFC 7540)

422 Unprocessable Entity (RFC 4918)

423 Locked (RFC 4918)

424 Failed Dependency (RFC 4918)

426 Upgrade Required (RFC 7231)

428 Precondition Required (RFC 6585)

429 Too Many Requests (RFC 6585)

431 Request Header Fields Too Large (RFC 6585)

451 Unavailable For Legal Reasons (RFC 7725)

500 Internal Server Error (RFC 7231)

501 Not Implemented (RFC 7231)

502 Bad Gateway (RFC 7231)

503 Service Unavailable (RFC 7231)

504 Gateway Timeout (RFC 7231)

505 HTTP Version Not Supported (RFC 7231)

506 Variant Also Negotiates (RFC 2295)

507 Insufficient Storage (RFC 4918)

508 Loop Detected (RFC 5842)

510 Not Extended (RFC 2774)

511 Network Authentication Required (RFC 6585)

Unknown status code

Methods

impl StatusCode
[src]

[src]

Returns the numeric status code

[src]

Returns the reason phrase of HTTP status code

[src]

Returns the status class of status code

Trait Implementations

impl Debug for StatusCode
[src]

[src]

Formats the value using the given formatter.

impl Eq for StatusCode
[src]

impl PartialEq for StatusCode
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Ord for StatusCode
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for StatusCode
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Hash for StatusCode
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl From<u16> for StatusCode
[src]

[src]

Performs the conversion.

impl Display for StatusCode
[src]

[src]

Formats the value using the given formatter. Read more