pub struct StatusCode(pub u16);Expand description
HTTP status code.
Tuple Fields§
§0: u16Implementations§
Source§impl StatusCode
impl StatusCode
Sourcepub fn is_success(self) -> bool
pub fn is_success(self) -> bool
Returns true if the status code is in the 2xx range.
Sourcepub fn is_redirection(self) -> bool
pub fn is_redirection(self) -> bool
Returns true if the status code is in the 3xx range.
Trait Implementations§
Source§impl Clone for StatusCode
impl Clone for StatusCode
Source§fn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StatusCode
Source§impl Debug for StatusCode
impl Debug for StatusCode
Source§impl Deref for StatusCode
impl Deref for StatusCode
impl Eq for StatusCode
Source§impl PartialEq for StatusCode
impl PartialEq for StatusCode
Source§fn eq(&self, other: &StatusCode) -> bool
fn eq(&self, other: &StatusCode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StatusCode
Auto Trait Implementations§
impl Freeze for StatusCode
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnsafeUnpin for StatusCode
impl UnwindSafe for StatusCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more