Struct safe_http::StatusCode
source · [−]pub struct StatusCode(_);
Implementations
sourceimpl StatusCode
impl StatusCode
pub fn to_u16(self) -> u16
pub fn try_from_u16(code: u16) -> Result<Self, InvalidStatusCode>
pub fn is_informational(self) -> bool
pub fn is_successful(self) -> bool
pub fn is_redirection(self) -> bool
pub fn is_client_error(self) -> bool
pub fn is_server_error(self) -> bool
sourceimpl StatusCode
impl StatusCode
sourcepub const CONTINUE: Self
pub const CONTINUE: Self
100 Continue (RFC7231, Section 6.2.1)
sourcepub const SWITCHING_PROTOCOLS: Self
pub const SWITCHING_PROTOCOLS: Self
101 Switching Protocols (RFC7231, Section 6.2.2)
sourcepub const OK: Self
pub const OK: Self
200 OK (RFC7231, Section 6.3.1)
sourcepub const CREATED: Self
pub const CREATED: Self
201 Created (RFC7231, Section 6.3.2)
sourcepub const ACCEPTED: Self
pub const ACCEPTED: Self
202 Accepted (RFC7231, Section 6.3.3)
sourcepub const NON_AUTHORITATIVE_INFORMATION: Self
pub const NON_AUTHORITATIVE_INFORMATION: Self
203 Non-Authoritative Information (RFC7231, Section 6.3.4)
sourcepub const NO_CONTENT: Self
pub const NO_CONTENT: Self
204 No Content (RFC7231, Section 6.3.5)
sourcepub const RESET_CONTENT: Self
pub const RESET_CONTENT: Self
205 Reset Content (RFC7231, Section 6.3.6)
sourcepub const PARTIAL_CONTENT: Self
pub const PARTIAL_CONTENT: Self
206 Partial Content (RFC7233, Section 4.1)
sourcepub const MULTIPLE_CHOICES: Self
pub const MULTIPLE_CHOICES: Self
300 Multiple Choices (RFC7231, Section 6.4.1)
sourcepub const MOVED_PERMANENTLY: Self
pub const MOVED_PERMANENTLY: Self
301 Moved Permanently (RFC7231, Section 6.4.2)
sourcepub const FOUND: Self
pub const FOUND: Self
302 Found (RFC7231, Section 6.4.3)
sourcepub const SEE_OTHER: Self
pub const SEE_OTHER: Self
303 See Other (RFC7231, Section 6.4.4)
sourcepub const NOT_MODIFIED: Self
pub const NOT_MODIFIED: Self
304 Not Modified (RFC7232, Section 4.1)
sourcepub const USE_PROXY: Self
pub const USE_PROXY: Self
305 Use Proxy (RFC7231, Section 6.4.5)
sourcepub const TEMPORARY_REDIRECT: Self
pub const TEMPORARY_REDIRECT: Self
307 Temporary Redirect (RFC7231, Section 6.4.7)
sourcepub const BAD_REQUEST: Self
pub const BAD_REQUEST: Self
400 Bad Request (RFC7231, Section 6.5.1)
sourcepub const UNAUTHORIZED: Self
pub const UNAUTHORIZED: Self
401 Unauthorized (RFC7235, Section 3.1)
sourcepub const PAYMENT_REQUIRED: Self
pub const PAYMENT_REQUIRED: Self
402 Payment Required (RFC7231, Section 6.5.2)
sourcepub const FORBIDDEN: Self
pub const FORBIDDEN: Self
403 Forbidden (RFC7231, Section 6.5.3)
sourcepub const NOT_FOUND: Self
pub const NOT_FOUND: Self
404 Not Found (RFC7231, Section 6.5.4)
sourcepub const METHOD_NOT_ALLOWED: Self
pub const METHOD_NOT_ALLOWED: Self
405 Method Not Allowed (RFC7231, Section 6.5.5)
sourcepub const NOT_ACCEPTABLE: Self
pub const NOT_ACCEPTABLE: Self
406 Not Acceptable (RFC7231, Section 6.5.6)
sourcepub const PROXY_AUTHENTICATION_REQUIRED: Self
pub const PROXY_AUTHENTICATION_REQUIRED: Self
407 Proxy Authentication Required (RFC7235, Section 3.2)
sourcepub const REQUEST_TIMEOUT: Self
pub const REQUEST_TIMEOUT: Self
408 Request Timeout (RFC7231, Section 6.5.7)
sourcepub const CONFLICT: Self
pub const CONFLICT: Self
409 Conflict (RFC7231, Section 6.5.8)
sourcepub const GONE: Self
pub const GONE: Self
410 Gone (RFC7231, Section 6.5.9)
sourcepub const LENGTH_REQUIRED: Self
pub const LENGTH_REQUIRED: Self
411 Length Required (RFC7231, Section 6.5.10)
sourcepub const PRECONDITION_FAILED: Self
pub const PRECONDITION_FAILED: Self
412 Precondition Failed (RFC7232, Section 4.2)
sourcepub const PAYLOAD_TOO_LARGE: Self
pub const PAYLOAD_TOO_LARGE: Self
413 Payload Too Large (RFC7231, Section 6.5.11)
sourcepub const URI_TOO_LONG: Self
pub const URI_TOO_LONG: Self
414 URI Too Long (RFC7231, Section 6.5.12)
sourcepub const UNSUPPORTED_MEDIA_TYPE: Self
pub const UNSUPPORTED_MEDIA_TYPE: Self
415 Unsupported Media Type (RFC7231, Section 6.5.13)
sourcepub const RANGE_NOT_SATISFIABLE: Self
pub const RANGE_NOT_SATISFIABLE: Self
416 Range Not Satisfiable (RFC7233, Section 4.4)
sourcepub const EXPECTATION_FAILED: Self
pub const EXPECTATION_FAILED: Self
417 Expectation Failed (RFC7231, Section 6.5.14)
sourcepub const UPGRADE_REQUIRED: Self
pub const UPGRADE_REQUIRED: Self
426 Upgrade Required (RFC7231, Section 6.5.15)
sourcepub const INTERNAL_SERVER_ERROR: Self
pub const INTERNAL_SERVER_ERROR: Self
500 Internal Server Error (RFC7231, Section 6.6.1)
sourcepub const NOT_IMPLEMENTED: Self
pub const NOT_IMPLEMENTED: Self
501 Not Implemented (RFC7231, Section 6.6.2)
sourcepub const BAD_GATEWAY: Self
pub const BAD_GATEWAY: Self
502 Bad Gateway (RFC7231, Section 6.6.3)
sourcepub const SERVICE_UNAVAILABLE: Self
pub const SERVICE_UNAVAILABLE: Self
503 Service Unavailable (RFC7231, Section 6.6.4)
sourcepub const GATEWAY_TIMEOUT: Self
pub const GATEWAY_TIMEOUT: Self
504 Gateway Timeout (RFC7231, Section 6.6.5)
sourcepub const HTTP_VERSION_NOT_SUPPORTED: Self
pub const HTTP_VERSION_NOT_SUPPORTED: Self
505 HTTP Version Not Supported (RFC7231, Section 6.6.6)
Trait Implementations
sourceimpl Clone for StatusCode
impl Clone for StatusCode
sourcefn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StatusCode
impl Debug for StatusCode
sourceimpl Default for StatusCode
impl Default for StatusCode
sourceimpl From<StatusCode> for ResponseLine
impl From<StatusCode> for ResponseLine
sourcefn from(status_code: StatusCode) -> Self
fn from(status_code: StatusCode) -> Self
Performs the conversion.
sourceimpl From<StatusCode> for u16
impl From<StatusCode> for u16
sourcefn from(s: StatusCode) -> Self
fn from(s: StatusCode) -> Self
Performs the conversion.
sourceimpl Hash for StatusCode
impl Hash for StatusCode
sourceimpl Ord for StatusCode
impl Ord for StatusCode
sourceimpl PartialEq<StatusCode> for StatusCode
impl PartialEq<StatusCode> for StatusCode
sourcefn eq(&self, other: &StatusCode) -> bool
fn eq(&self, other: &StatusCode) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &StatusCode) -> bool
fn ne(&self, other: &StatusCode) -> bool
This method tests for !=
.
sourceimpl PartialEq<u16> for StatusCode
impl PartialEq<u16> for StatusCode
sourceimpl PartialOrd<StatusCode> for StatusCode
impl PartialOrd<StatusCode> for StatusCode
sourcefn partial_cmp(&self, other: &StatusCode) -> Option<Ordering>
fn partial_cmp(&self, other: &StatusCode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<u16> for StatusCode
impl PartialOrd<u16> for StatusCode
sourcefn partial_cmp(&self, other: &u16) -> Option<Ordering>
fn partial_cmp(&self, other: &u16) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for StatusCode
impl Eq for StatusCode
impl StructuralEq for StatusCode
impl StructuralPartialEq for StatusCode
Auto Trait Implementations
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnwindSafe for StatusCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more