Enum http_test_server::http::Status [−][src]
pub enum Status { Continue, SwitchingProtocols, Processing, OK, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultiStatus, MultipleChoices, MovedPermanently, Found, SeeOther, NotModified, UseProxy, TemporaryRedirect, PermanentRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, PreconditionFailed, PayloadTooLarge, UriTooLong, UnsupportedMediaType, RangeNotSatisfiable, ExpectationFailed, ImATeapot, UnprocessableEntity, Locked, FailedDependency, UpgradeRequired, PreconditionRequired, TooManyRequests, RequestHeaderFieldsTooLarge, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, HttpVersionNotSupported, InsufficientStorage, NetworkAuthenticationRequired, }
HTTP status
Can be converted to its numeral equivalent.
let status_code = Status::NotFound as u16; assert_eq!(status_code, 404);
Variants
Continue
SwitchingProtocols
Processing
OK
Created
Accepted
NonAuthoritativeInformation
NoContent
ResetContent
PartialContent
MultiStatus
MultipleChoices
MovedPermanently
Found
SeeOther
NotModified
UseProxy
TemporaryRedirect
PermanentRedirect
BadRequest
PaymentRequired
Forbidden
NotFound
MethodNotAllowed
NotAcceptable
ProxyAuthenticationRequired
RequestTimeout
Conflict
Gone
LengthRequired
PreconditionFailed
PayloadTooLarge
UriTooLong
UnsupportedMediaType
RangeNotSatisfiable
ExpectationFailed
ImATeapot
UnprocessableEntity
Locked
FailedDependency
UpgradeRequired
PreconditionRequired
TooManyRequests
RequestHeaderFieldsTooLarge
InternalServerError
NotImplemented
BadGateway
GatewayTimeout
HttpVersionNotSupported
InsufficientStorage
NetworkAuthenticationRequired
Methods
impl Status
[src]
impl Status
pub fn description(&self) -> &'static str
[src]
pub fn description(&self) -> &'static str
Returns status' full description
use http_test_server::http::Status; let description = Status::MultipleChoices.description(); assert_eq!(description, "300 Multiple Choices");