Struct HTTPStatus

Source
pub struct HTTPStatus(pub ngx_uint_t);
Expand description

Represents an HTTP status code.

Tuple Fields§

§0: ngx_uint_t

Implementations§

Source§

impl HTTPStatus

Source

pub fn from_u16(src: u16) -> Result<HTTPStatus, InvalidHTTPStatusCode>

Convets a u16 to a status code.

Source

pub fn from_bytes(src: &[u8]) -> Result<HTTPStatus, InvalidHTTPStatusCode>

Converts a &u8 to a status code.

Source§

impl HTTPStatus

Source

pub const CONTINUE: HTTPStatus

100 CONTINUE

Source

pub const SWITCHING_PROTOCOLS: HTTPStatus

101 SWITCHING_PROTOCOLS

Source

pub const PROCESSING: HTTPStatus

102 PROCESSING

Source

pub const OK: HTTPStatus

200 OK

Source

pub const CREATED: HTTPStatus

201 Created

Source

pub const ACCEPTED: HTTPStatus

202 Accepted

Source

pub const NO_CONTENT: HTTPStatus

204 No Content

Source

pub const PARTIAL_CONTENT: HTTPStatus

206 Partial Content

Source

pub const SPECIAL_RESPONSE: HTTPStatus

300 SPECIAL_RESPONSE

Source

pub const MOVED_PERMANENTLY: HTTPStatus

301 Moved Permanently

Source

pub const MOVED_TEMPORARILY: HTTPStatus

302 Moved Temporarily

Source

pub const SEE_OTHER: HTTPStatus

303 See Other

Source

pub const NOT_MODIFIED: HTTPStatus

304 Not Modified

Source

pub const TEMPORARY_REDIRECT: HTTPStatus

307 Temporary Redirect

Source

pub const PERMANENT_REDIRECT: HTTPStatus

308 Permanent Redirect

Source

pub const BAD_REQUEST: HTTPStatus

400 Bad Request

Source

pub const UNAUTHORIZED: HTTPStatus

401 Unauthorized

Source

pub const FORBIDDEN: HTTPStatus

403 Forbidden

Source

pub const NOT_FOUND: HTTPStatus

404 Not Found

Source

pub const NOT_ALLOWED: HTTPStatus

405 Method Not Allowed

Source

pub const REQUEST_TIME_OUT: HTTPStatus

408 Request Time Out

Source

pub const CONFLICT: HTTPStatus

409 Conflict

Source

pub const LENGTH_REQUIRED: HTTPStatus

411 Length Required

Source

pub const PRECONDITION_FAILED: HTTPStatus

412 Precondition Failed

Source

pub const REQUEST_ENTITY_TOO_LARGE: HTTPStatus

413 Payload Too Large

Source

pub const REQUEST_URI_TOO_LARGE: HTTPStatus

414 Request Uri Too Large

Source

pub const UNSUPPORTED_MEDIA_TYPE: HTTPStatus

415 Unsupported Media Type

Source

pub const RANGE_NOT_SATISFIABLE: HTTPStatus

416 Range Not Satisfiable

Source

pub const MISDIRECTED_REQUEST: HTTPStatus

421 Misdirected Request

Source

pub const TOO_MANY_REQUESTS: HTTPStatus

429 Too Many Requests

Source

pub const CLOSE: HTTPStatus

444 CLOSE

Source

pub const NGINX_CODES: HTTPStatus

494 NGINX_CODES

Source

pub const REQUEST_HEADER_TOO_LARGE: HTTPStatus

494 REQUEST_HEADER_TOO_LARGE

Source

pub const HTTPS_CERT_ERROR: HTTPStatus

495 NGX_HTTPS_CERT_ERROR

Source

pub const HTTPS_NO_CERT: HTTPStatus

496 NGX_HTTPS_NO_CERT

Source

pub const TO_HTTPS: HTTPStatus

497 TO_HTTPS

Source

pub const CLIENT_CLOSED_REQUEST: HTTPStatus

499 CLIENT_CLOSED_REQUEST

Source

pub const INTERNAL_SERVER_ERROR: HTTPStatus

500 INTERNAL_SERVER_ERROR

Source

pub const NOT_IMPLEMENTED: HTTPStatus

501 NOT_IMPLEMENTED

Source

pub const BAD_GATEWAY: HTTPStatus

502 BAD_GATEWAY

Source

pub const SERVICE_UNAVAILABLE: HTTPStatus

503 SERVICE_UNAVAILABLE

Source

pub const GATEWAY_TIME_OUT: HTTPStatus

504 GATEWAY_TIME_OUT

Source

pub const VERSION_NOT_SUPPORTED: HTTPStatus

505 VERSION_NOT_SUPPORTED

Source

pub const INSUFFICIENT_STORAGE: HTTPStatus

507 INSUFFICIENT_STORAGE

Trait Implementations§

Source§

impl Clone for HTTPStatus

Source§

fn clone(&self) -> HTTPStatus

Returns a copy 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 HTTPStatus

Source§

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

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

impl From<HTTPStatus> for Status

Source§

fn from(val: HTTPStatus) -> Self

Converts to this type from the input type.
Source§

impl From<HTTPStatus> for ngx_uint_t

Source§

fn from(val: HTTPStatus) -> Self

Converts to this type from the input type.
Source§

impl Hash for HTTPStatus

Source§

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

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 HTTPStatus

Source§

fn cmp(&self, other: &HTTPStatus) -> 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 for HTTPStatus

Source§

fn eq(&self, other: &HTTPStatus) -> 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 for HTTPStatus

Source§

fn partial_cmp(&self, other: &HTTPStatus) -> 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 HTTPStatus

Source§

impl Eq for HTTPStatus

Source§

impl StructuralPartialEq for HTTPStatus

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.