Struct tiny_http::StatusCode
source · pub struct StatusCode(pub u16);
Expand description
Status code of a request or response.
Tuple Fields
0: u16
Implementations
sourceimpl StatusCode
impl StatusCode
sourcepub fn default_reason_phrase(&self) -> &'static str
pub fn default_reason_phrase(&self) -> &'static str
Returns the default reason phrase for this status code. For example the status code 404 corresponds to “Not Found”.
Trait Implementations
sourceimpl AsRef<u16> for StatusCode
impl AsRef<u16> for StatusCode
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 moresourceimpl Debug for StatusCode
impl Debug for StatusCode
sourceimpl From<i16> for StatusCode
impl From<i16> for StatusCode
sourcefn from(in_code: i16) -> StatusCode
fn from(in_code: i16) -> StatusCode
Converts to this type from the input type.
sourceimpl From<i32> for StatusCode
impl From<i32> for StatusCode
sourcefn from(in_code: i32) -> StatusCode
fn from(in_code: i32) -> StatusCode
Converts to this type from the input type.
sourceimpl From<i8> for StatusCode
impl From<i8> for StatusCode
sourcefn from(in_code: i8) -> StatusCode
fn from(in_code: i8) -> StatusCode
Converts to this type from the input type.
sourceimpl From<u16> for StatusCode
impl From<u16> for StatusCode
sourcefn from(in_code: u16) -> StatusCode
fn from(in_code: u16) -> StatusCode
Converts to this type from the input type.
sourceimpl From<u32> for StatusCode
impl From<u32> for StatusCode
sourcefn from(in_code: u32) -> StatusCode
fn from(in_code: u32) -> StatusCode
Converts to this type from the input type.
sourceimpl From<u8> for StatusCode
impl From<u8> for StatusCode
sourcefn from(in_code: u8) -> StatusCode
fn from(in_code: u8) -> StatusCode
Converts to this type from the input type.
sourceimpl Ord for StatusCode
impl Ord for StatusCode
sourcefn cmp(&self, other: &StatusCode) -> Ordering
fn cmp(&self, other: &StatusCode) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<StatusCode> for StatusCode
impl PartialEq<StatusCode> for StatusCode
sourcefn eq(&self, other: &StatusCode) -> bool
fn eq(&self, other: &StatusCode) -> bool
sourceimpl PartialEq<StatusCode> for u16
impl PartialEq<StatusCode> for u16
sourcefn eq(&self, other: &StatusCode) -> bool
fn eq(&self, other: &StatusCode) -> bool
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>
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 moresourceimpl PartialOrd<StatusCode> for u16
impl PartialOrd<StatusCode> for u16
sourcefn partial_cmp(&self, other: &StatusCode) -> Option<Ordering>
fn partial_cmp(&self, other: &StatusCode) -> Option<Ordering>
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 moresourceimpl 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>
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 moreimpl 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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