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
ContinueSwitchingProtocolOkCreatedAcceptedNonAuthoritativeInformationNoContentResetContentPartialContentMultipleChoicesMovedPermanentlyFoundSeeOtherNotModifiedUseProxyTemporaryRedirectPermanentRedirectBadRequestPaymentRequiredForbiddenNotFoundMethodNotAllowedNotAcceptableProxyAuthenticationRequiredRequestTimeoutConflictGoneLengthRequiredPreconditionFailedRequestEntityTooLargeRequestURITooLongUnsupportedMediaTypeRequestRangeNotSatisfiableExpectationFailedUpgradeRequiredTooManyRequestsInternalServerErrorNotImplementedBadGatewayGatewayTimeoutVersionNotSupported
Methods
impl Status[src]
Returns reason for specified status code.
pub fn code(&self) -> u16[src]
Returns 3 digit numeric code
pub fn reason(&self) -> &'static str[src]
Returns title for the status code
pub fn response_has_body(&self) -> bool[src]
Returns true if sending body is expected for such status code
pub fn from(code: u16) -> Option<Status>[src]
Make Status from u16 if known code is passed.
Trait Implementations
impl Debug for Status[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialEq for Status[src]
fn eq(&self, __arg_0: &Status) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.