StatusCode

Struct StatusCode 

Source
pub struct StatusCode(/* private fields */);

Implementations§

Source§

impl StatusCode

Source§

impl StatusCode

Source

pub const CONTINUE: StatusCode

100 Continue (RFC7231, Section 6.2.1)

Source

pub const SWITCHING_PROTOCOLS: StatusCode

101 Switching Protocols (RFC7231, Section 6.2.2)

Source

pub const OK: StatusCode

Source

pub const CREATED: StatusCode

201 Created (RFC7231, Section 6.3.2)

Source

pub const ACCEPTED: StatusCode

202 Accepted (RFC7231, Section 6.3.3)

Source

pub const NON_AUTHORITATIVE_INFORMATION: StatusCode

203 Non-Authoritative Information (RFC7231, Section 6.3.4)

Source

pub const NO_CONTENT: StatusCode

204 No Content (RFC7231, Section 6.3.5)

Source

pub const RESET_CONTENT: StatusCode

205 Reset Content (RFC7231, Section 6.3.6)

Source

pub const PARTIAL_CONTENT: StatusCode

206 Partial Content (RFC7233, Section 4.1)

Source

pub const MULTIPLE_CHOICES: StatusCode

300 Multiple Choices (RFC7231, Section 6.4.1)

Source

pub const MOVED_PERMANENTLY: StatusCode

301 Moved Permanently (RFC7231, Section 6.4.2)

Source

pub const FOUND: StatusCode

Source

pub const SEE_OTHER: StatusCode

303 See Other (RFC7231, Section 6.4.4)

Source

pub const NOT_MODIFIED: StatusCode

304 Not Modified (RFC7232, Section 4.1)

Source

pub const USE_PROXY: StatusCode

305 Use Proxy (RFC7231, Section 6.4.5)

Source

pub const TEMPORARY_REDIRECT: StatusCode

307 Temporary Redirect (RFC7231, Section 6.4.7)

Source

pub const BAD_REQUEST: StatusCode

400 Bad Request (RFC7231, Section 6.5.1)

Source

pub const UNAUTHORIZED: StatusCode

401 Unauthorized (RFC7235, Section 3.1)

Source

pub const PAYMENT_REQUIRED: StatusCode

402 Payment Required (RFC7231, Section 6.5.2)

Source

pub const FORBIDDEN: StatusCode

403 Forbidden (RFC7231, Section 6.5.3)

Source

pub const NOT_FOUND: StatusCode

404 Not Found (RFC7231, Section 6.5.4)

Source

pub const METHOD_NOT_ALLOWED: StatusCode

405 Method Not Allowed (RFC7231, Section 6.5.5)

Source

pub const NOT_ACCEPTABLE: StatusCode

406 Not Acceptable (RFC7231, Section 6.5.6)

Source

pub const PROXY_AUTHENTICATION_REQUIRED: StatusCode

407 Proxy Authentication Required (RFC7235, Section 3.2)

Source

pub const REQUEST_TIMEOUT: StatusCode

408 Request Timeout (RFC7231, Section 6.5.7)

Source

pub const CONFLICT: StatusCode

409 Conflict (RFC7231, Section 6.5.8)

Source

pub const GONE: StatusCode

Source

pub const LENGTH_REQUIRED: StatusCode

411 Length Required (RFC7231, Section 6.5.10)

Source

pub const PRECONDITION_FAILED: StatusCode

412 Precondition Failed (RFC7232, Section 4.2)

Source

pub const PAYLOAD_TOO_LARGE: StatusCode

413 Payload Too Large (RFC7231, Section 6.5.11)

Source

pub const URI_TOO_LONG: StatusCode

414 URI Too Long (RFC7231, Section 6.5.12)

Source

pub const UNSUPPORTED_MEDIA_TYPE: StatusCode

415 Unsupported Media Type (RFC7231, Section 6.5.13)

Source

pub const RANGE_NOT_SATISFIABLE: StatusCode

416 Range Not Satisfiable (RFC7233, Section 4.4)

Source

pub const EXPECTATION_FAILED: StatusCode

417 Expectation Failed (RFC7231, Section 6.5.14)

Source

pub const UPGRADE_REQUIRED: StatusCode

426 Upgrade Required (RFC7231, Section 6.5.15)

Source

pub const INTERNAL_SERVER_ERROR: StatusCode

500 Internal Server Error (RFC7231, Section 6.6.1)

Source

pub const NOT_IMPLEMENTED: StatusCode

501 Not Implemented (RFC7231, Section 6.6.2)

Source

pub const BAD_GATEWAY: StatusCode

502 Bad Gateway (RFC7231, Section 6.6.3)

Source

pub const SERVICE_UNAVAILABLE: StatusCode

503 Service Unavailable (RFC7231, Section 6.6.4)

Source

pub const GATEWAY_TIMEOUT: StatusCode

504 Gateway Timeout (RFC7231, Section 6.6.5)

Source

pub const HTTP_VERSION_NOT_SUPPORTED: StatusCode

505 HTTP Version Not Supported (RFC7231, Section 6.6.6)

Trait Implementations§

Source§

impl Clone for StatusCode

Source§

fn clone(&self) -> StatusCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StatusCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for StatusCode

Source§

fn default() -> StatusCode

Returns the “default value” for a type. Read more
Source§

impl From<StatusCode> for ResponseLine

Source§

fn from(status_code: StatusCode) -> ResponseLine

Converts to this type from the input type.
Source§

impl Hash for StatusCode

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for StatusCode

Source§

fn cmp(&self, other: &StatusCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<u16> for StatusCode

Source§

fn eq(&self, other: &u16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for StatusCode

Source§

fn eq(&self, other: &StatusCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd<u16> for StatusCode

Source§

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 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd for StatusCode

Source§

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 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for StatusCode

Source§

impl Eq for StatusCode

Source§

impl StructuralPartialEq for StatusCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.