Enum tk_http::Status
[−]
[src]
pub enum Status { Continue, SwitchingProtocol, Ok, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultipleChoices, MovedPermanently, Found, SeeOther, NotModified, UseProxy, TemporaryRedirect, PermanentRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, PreconditionFailed, RequestEntityTooLarge, RequestURITooLong, UnsupportedMediaType, RequestRangeNotSatisfiable, ExpectationFailed, UpgradeRequired, TooManyRequests, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, VersionNotSupported, }
Enum with some HTTP Status codes.
Variants
Continue
SwitchingProtocol
Ok
Created
Accepted
NonAuthoritativeInformation
NoContent
ResetContent
PartialContent
MultipleChoices
MovedPermanently
Found
SeeOther
NotModified
UseProxy
TemporaryRedirect
PermanentRedirect
BadRequest
PaymentRequired
Forbidden
NotFound
MethodNotAllowed
NotAcceptable
ProxyAuthenticationRequired
RequestTimeout
Conflict
Gone
LengthRequired
PreconditionFailed
RequestEntityTooLarge
RequestURITooLong
UnsupportedMediaType
RequestRangeNotSatisfiable
ExpectationFailed
UpgradeRequired
TooManyRequests
InternalServerError
NotImplemented
BadGateway
GatewayTimeout
VersionNotSupported
Methods
impl Status
[src]
Returns reason for specified status code.
fn code(&self) -> u16
Returns 3 digit numeric code
fn reason(&self) -> &'static str
Returns title for the status code
fn response_has_body(&self) -> bool
Returns true if sending body is expected for such status code
fn from(code: u16) -> Option<Status>
Make Status from u16 if known code is passed.
Trait Implementations
impl Debug for Status
[src]
impl PartialEq for Status
[src]
fn eq(&self, __arg_0: &Status) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Copy for Status
[src]
impl Clone for Status
[src]
fn clone(&self) -> Status
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more