safe_http 0.1.0-beta.4

Simple and safe HTTP types.
Documentation
// This file is automatically generated.

impl super::StatusCode {
    /// 100 Continue
    /// ([RFC7231, Section 6.2.1](https://tools.ietf.org/html/rfc7231#section-6.2.1))
    pub const CONTINUE: Self = Self::internal_from_const_u16(100);

    /// 101 Switching Protocols
    /// ([RFC7231, Section 6.2.2](https://tools.ietf.org/html/rfc7231#section-6.2.2))
    pub const SWITCHING_PROTOCOLS: Self = Self::internal_from_const_u16(101);

    /// 200 OK
    /// ([RFC7231, Section 6.3.1](https://tools.ietf.org/html/rfc7231#section-6.3.1))
    pub const OK: Self = Self::internal_from_const_u16(200);

    /// 201 Created
    /// ([RFC7231, Section 6.3.2](https://tools.ietf.org/html/rfc7231#section-6.3.2))
    pub const CREATED: Self = Self::internal_from_const_u16(201);

    /// 202 Accepted
    /// ([RFC7231, Section 6.3.3](https://tools.ietf.org/html/rfc7231#section-6.3.3))
    pub const ACCEPTED: Self = Self::internal_from_const_u16(202);

    /// 203 Non-Authoritative Information
    /// ([RFC7231, Section 6.3.4](https://tools.ietf.org/html/rfc7231#section-6.3.4))
    pub const NON_AUTHORITATIVE_INFORMATION: Self = Self::internal_from_const_u16(203);

    /// 204 No Content
    /// ([RFC7231, Section 6.3.5](https://tools.ietf.org/html/rfc7231#section-6.3.5))
    pub const NO_CONTENT: Self = Self::internal_from_const_u16(204);

    /// 205 Reset Content
    /// ([RFC7231, Section 6.3.6](https://tools.ietf.org/html/rfc7231#section-6.3.6))
    pub const RESET_CONTENT: Self = Self::internal_from_const_u16(205);

    /// 206 Partial Content
    /// ([RFC7233, Section 4.1](https://tools.ietf.org/html/rfc7233#section-4.1))
    pub const PARTIAL_CONTENT: Self = Self::internal_from_const_u16(206);

    /// 300 Multiple Choices
    /// ([RFC7231, Section 6.4.1](https://tools.ietf.org/html/rfc7231#section-6.4.1))
    pub const MULTIPLE_CHOICES: Self = Self::internal_from_const_u16(300);

    /// 301 Moved Permanently
    /// ([RFC7231, Section 6.4.2](https://tools.ietf.org/html/rfc7231#section-6.4.2))
    pub const MOVED_PERMANENTLY: Self = Self::internal_from_const_u16(301);

    /// 302 Found
    /// ([RFC7231, Section 6.4.3](https://tools.ietf.org/html/rfc7231#section-6.4.3))
    pub const FOUND: Self = Self::internal_from_const_u16(302);

    /// 303 See Other
    /// ([RFC7231, Section 6.4.4](https://tools.ietf.org/html/rfc7231#section-6.4.4))
    pub const SEE_OTHER: Self = Self::internal_from_const_u16(303);

    /// 304 Not Modified
    /// ([RFC7232, Section 4.1](https://tools.ietf.org/html/rfc7232#section-4.1))
    pub const NOT_MODIFIED: Self = Self::internal_from_const_u16(304);

    /// 305 Use Proxy
    /// ([RFC7231, Section 6.4.5](https://tools.ietf.org/html/rfc7231#section-6.4.5))
    pub const USE_PROXY: Self = Self::internal_from_const_u16(305);

    /// 307 Temporary Redirect
    /// ([RFC7231, Section 6.4.7](https://tools.ietf.org/html/rfc7231#section-6.4.7))
    pub const TEMPORARY_REDIRECT: Self = Self::internal_from_const_u16(307);

    /// 400 Bad Request
    /// ([RFC7231, Section 6.5.1](https://tools.ietf.org/html/rfc7231#section-6.5.1))
    pub const BAD_REQUEST: Self = Self::internal_from_const_u16(400);

    /// 401 Unauthorized
    /// ([RFC7235, Section 3.1](https://tools.ietf.org/html/rfc7235#section-3.1))
    pub const UNAUTHORIZED: Self = Self::internal_from_const_u16(401);

    /// 402 Payment Required
    /// ([RFC7231, Section 6.5.2](https://tools.ietf.org/html/rfc7231#section-6.5.2))
    pub const PAYMENT_REQUIRED: Self = Self::internal_from_const_u16(402);

    /// 403 Forbidden
    /// ([RFC7231, Section 6.5.3](https://tools.ietf.org/html/rfc7231#section-6.5.3))
    pub const FORBIDDEN: Self = Self::internal_from_const_u16(403);

    /// 404 Not Found
    /// ([RFC7231, Section 6.5.4](https://tools.ietf.org/html/rfc7231#section-6.5.4))
    pub const NOT_FOUND: Self = Self::internal_from_const_u16(404);

    /// 405 Method Not Allowed
    /// ([RFC7231, Section 6.5.5](https://tools.ietf.org/html/rfc7231#section-6.5.5))
    pub const METHOD_NOT_ALLOWED: Self = Self::internal_from_const_u16(405);

    /// 406 Not Acceptable
    /// ([RFC7231, Section 6.5.6](https://tools.ietf.org/html/rfc7231#section-6.5.6))
    pub const NOT_ACCEPTABLE: Self = Self::internal_from_const_u16(406);

    /// 407 Proxy Authentication Required
    /// ([RFC7235, Section 3.2](https://tools.ietf.org/html/rfc7235#section-3.2))
    pub const PROXY_AUTHENTICATION_REQUIRED: Self = Self::internal_from_const_u16(407);

    /// 408 Request Timeout
    /// ([RFC7231, Section 6.5.7](https://tools.ietf.org/html/rfc7231#section-6.5.7))
    pub const REQUEST_TIMEOUT: Self = Self::internal_from_const_u16(408);

    /// 409 Conflict
    /// ([RFC7231, Section 6.5.8](https://tools.ietf.org/html/rfc7231#section-6.5.8))
    pub const CONFLICT: Self = Self::internal_from_const_u16(409);

    /// 410 Gone
    /// ([RFC7231, Section 6.5.9](https://tools.ietf.org/html/rfc7231#section-6.5.9))
    pub const GONE: Self = Self::internal_from_const_u16(410);

    /// 411 Length Required
    /// ([RFC7231, Section 6.5.10](https://tools.ietf.org/html/rfc7231#section-6.5.10))
    pub const LENGTH_REQUIRED: Self = Self::internal_from_const_u16(411);

    /// 412 Precondition Failed
    /// ([RFC7232, Section 4.2](https://tools.ietf.org/html/rfc7232#section-4.2))
    pub const PRECONDITION_FAILED: Self = Self::internal_from_const_u16(412);

    /// 413 Payload Too Large
    /// ([RFC7231, Section 6.5.11](https://tools.ietf.org/html/rfc7231#section-6.5.11))
    pub const PAYLOAD_TOO_LARGE: Self = Self::internal_from_const_u16(413);

    /// 414 URI Too Long
    /// ([RFC7231, Section 6.5.12](https://tools.ietf.org/html/rfc7231#section-6.5.12))
    pub const URI_TOO_LONG: Self = Self::internal_from_const_u16(414);

    /// 415 Unsupported Media Type
    /// ([RFC7231, Section 6.5.13](https://tools.ietf.org/html/rfc7231#section-6.5.13))
    pub const UNSUPPORTED_MEDIA_TYPE: Self = Self::internal_from_const_u16(415);

    /// 416 Range Not Satisfiable
    /// ([RFC7233, Section 4.4](https://tools.ietf.org/html/rfc7233#section-4.4))
    pub const RANGE_NOT_SATISFIABLE: Self = Self::internal_from_const_u16(416);

    /// 417 Expectation Failed
    /// ([RFC7231, Section 6.5.14](https://tools.ietf.org/html/rfc7231#section-6.5.14))
    pub const EXPECTATION_FAILED: Self = Self::internal_from_const_u16(417);

    /// 426 Upgrade Required
    /// ([RFC7231, Section 6.5.15](https://tools.ietf.org/html/rfc7231#section-6.5.15))
    pub const UPGRADE_REQUIRED: Self = Self::internal_from_const_u16(426);

    /// 500 Internal Server Error
    /// ([RFC7231, Section 6.6.1](https://tools.ietf.org/html/rfc7231#section-6.6.1))
    pub const INTERNAL_SERVER_ERROR: Self = Self::internal_from_const_u16(500);

    /// 501 Not Implemented
    /// ([RFC7231, Section 6.6.2](https://tools.ietf.org/html/rfc7231#section-6.6.2))
    pub const NOT_IMPLEMENTED: Self = Self::internal_from_const_u16(501);

    /// 502 Bad Gateway
    /// ([RFC7231, Section 6.6.3](https://tools.ietf.org/html/rfc7231#section-6.6.3))
    pub const BAD_GATEWAY: Self = Self::internal_from_const_u16(502);

    /// 503 Service Unavailable
    /// ([RFC7231, Section 6.6.4](https://tools.ietf.org/html/rfc7231#section-6.6.4))
    pub const SERVICE_UNAVAILABLE: Self = Self::internal_from_const_u16(503);

    /// 504 Gateway Timeout
    /// ([RFC7231, Section 6.6.5](https://tools.ietf.org/html/rfc7231#section-6.6.5))
    pub const GATEWAY_TIMEOUT: Self = Self::internal_from_const_u16(504);

    /// 505 HTTP Version Not Supported
    /// ([RFC7231, Section 6.6.6](https://tools.ietf.org/html/rfc7231#section-6.6.6))
    pub const HTTP_VERSION_NOT_SUPPORTED: Self = Self::internal_from_const_u16(505);

    #[cfg(test)]
    pub(super) const GENERATED_CONSTANTS: &'static [Self] = &[
        Self::CONTINUE,
        Self::SWITCHING_PROTOCOLS,
        Self::OK,
        Self::CREATED,
        Self::ACCEPTED,
        Self::NON_AUTHORITATIVE_INFORMATION,
        Self::NO_CONTENT,
        Self::RESET_CONTENT,
        Self::PARTIAL_CONTENT,
        Self::MULTIPLE_CHOICES,
        Self::MOVED_PERMANENTLY,
        Self::FOUND,
        Self::SEE_OTHER,
        Self::NOT_MODIFIED,
        Self::USE_PROXY,
        Self::TEMPORARY_REDIRECT,
        Self::BAD_REQUEST,
        Self::UNAUTHORIZED,
        Self::PAYMENT_REQUIRED,
        Self::FORBIDDEN,
        Self::NOT_FOUND,
        Self::METHOD_NOT_ALLOWED,
        Self::NOT_ACCEPTABLE,
        Self::PROXY_AUTHENTICATION_REQUIRED,
        Self::REQUEST_TIMEOUT,
        Self::CONFLICT,
        Self::GONE,
        Self::LENGTH_REQUIRED,
        Self::PRECONDITION_FAILED,
        Self::PAYLOAD_TOO_LARGE,
        Self::URI_TOO_LONG,
        Self::UNSUPPORTED_MEDIA_TYPE,
        Self::RANGE_NOT_SATISFIABLE,
        Self::EXPECTATION_FAILED,
        Self::UPGRADE_REQUIRED,
        Self::INTERNAL_SERVER_ERROR,
        Self::NOT_IMPLEMENTED,
        Self::BAD_GATEWAY,
        Self::SERVICE_UNAVAILABLE,
        Self::GATEWAY_TIMEOUT,
        Self::HTTP_VERSION_NOT_SUPPORTED,
    ];
}