http_type/status_code/type.rs
1pub type StatusCodeUsize = usize;
2
3/// Enumeration of HTTP status codes representing various HTTP response statuses
4///
5/// This enum includes common HTTP status codes that cover successful requests, client errors,
6/// and server errors. Each variant represents a specific HTTP status code.
7#[derive(Debug, Clone, PartialEq, Eq)]
8pub enum StatusCode {
9 /// 100 Continue
10 Continue,
11 /// 101 Switching Protocols
12 SwitchingProtocols,
13 /// 102 Processing (WebDAV)
14 Processing,
15 /// 103 Early Hints
16 EarlyHints,
17 /// 200 OK
18 Ok,
19 /// 201 Created
20 Created,
21 /// 202 Accepted
22 Accepted,
23 /// 203 Non-Authoritative Information
24 NonAuthoritativeInformation,
25 /// 204 No Content
26 NoContent,
27 /// 205 Reset Content
28 ResetContent,
29 /// 206 Partial Content
30 PartialContent,
31 /// 207 Multi-Status (WebDAV)
32 MultiStatus,
33 /// 208 Already Reported (WebDAV)
34 AlreadyReported,
35 /// 226 IM Used
36 IMUsed,
37 /// 300 Multiple Choices
38 MultipleChoices,
39 /// 301 Moved Permanently
40 MovedPermanently,
41 /// 302 Found
42 Found,
43 /// 303 See Other
44 SeeOther,
45 /// 304 Not Modified
46 NotModified,
47 /// 305 Use Proxy
48 UseProxy,
49 /// 307 Temporary Redirect
50 TemporaryRedirect,
51 /// 308 Permanent Redirect
52 PermanentRedirect,
53 /// 400 Bad Request
54 BadRequest,
55 /// 401 Unauthorized
56 Unauthorized,
57 /// 402 Payment Required
58 PaymentRequired,
59 /// 403 Forbidden
60 Forbidden,
61 /// 404 Not Found
62 NotFound,
63 /// 405 Method Not Allowed
64 MethodNotAllowed,
65 /// 406 Not Acceptable
66 NotAcceptable,
67 /// 407 Proxy Authentication Required
68 ProxyAuthenticationRequired,
69 /// 408 Request Timeout
70 RequestTimeout,
71 /// 409 Conflict
72 Conflict,
73 /// 410 Gone
74 Gone,
75 /// 411 Length Required
76 LengthRequired,
77 /// 412 Precondition Failed
78 PreconditionFailed,
79 /// 413 Payload Too Large
80 PayloadTooLarge,
81 /// 414 URI Too Long
82 URITooLong,
83 /// 415 Unsupported Media Type
84 UnsupportedMediaType,
85 /// 416 Range Not Satisfiable
86 RangeNotSatisfiable,
87 /// 417 Expectation Failed
88 ExpectationFailed,
89 /// 418 I'm a teapot
90 ImATeapot,
91 /// 421 Misdirected Request
92 MisdirectedRequest,
93 /// 422 Unprocessable Entity (WebDAV)
94 UnprocessableEntity,
95 /// 423 Locked (WebDAV)
96 Locked,
97 /// 424 Failed Dependency (WebDAV)
98 FailedDependency,
99 /// 425 Too Early
100 TooEarly,
101 /// 426 Upgrade Required
102 UpgradeRequired,
103 /// 428 Precondition Required
104 PreconditionRequired,
105 /// 429 Too Many Requests
106 TooManyRequests,
107 /// 431 Request Header Fields Too Large
108 RequestHeaderFieldsTooLarge,
109 /// 451 Unavailable For Legal Reasons
110 UnavailableForLegalReasons,
111 /// 500 Internal Server Error
112 InternalServerError,
113 /// 501 Not Implemented
114 NotImplemented,
115 /// 502 Bad Gateway
116 BadGateway,
117 /// 503 Service Unavailable
118 ServiceUnavailable,
119 /// 504 Gateway Timeout
120 GatewayTimeout,
121 /// 505 HTTP Version Not Supported
122 HTTPVersionNotSupported,
123 /// 506 Variant Also Negotiates
124 VariantAlsoNegotiates,
125 /// 507 Insufficient Storage (WebDAV)
126 InsufficientStorage,
127 /// 508 Loop Detected (WebDAV)
128 LoopDetected,
129 /// 510 Not Extended
130 NotExtended,
131 /// 511 Network Authentication Required
132 NetworkAuthenticationRequired,
133 /// Unknown status code
134 Unknown,
135}