pub enum StatusCodeClass {
Informational,
Successful,
Redirection,
ClientError,
ServerError,
}Expand description
The class of the status code determine the result of the request and the semantics of the response.
§References
Variants§
Informational
The request was received, continuing process.
Successful
The request was successfully received, understood, and accepted.
Redirection
Further action needs to be taken in order to complete the request.
ClientError
The request contains bad syntax or cannot be fulfilled.
ServerError
The server failed to fulfill an apparently valid request.
Implementations§
Source§impl StatusCodeClass
impl StatusCodeClass
Sourcepub const fn is_client_error(&self) -> bool
pub const fn is_client_error(&self) -> bool
Checks if the status code is of the client error class, i.e. 4xx.
Sourcepub const fn is_informational(&self) -> bool
pub const fn is_informational(&self) -> bool
Checks if the status code is of the informational class, i.e. 1xx.
Sourcepub const fn is_redirection(&self) -> bool
pub const fn is_redirection(&self) -> bool
Checks if the status code is of the redirection class, i.e. 3xx.
Sourcepub const fn is_server_error(&self) -> bool
pub const fn is_server_error(&self) -> bool
Checks if the status code is of the server error class, i.e. 5xx.
Sourcepub const fn is_successful(&self) -> bool
pub const fn is_successful(&self) -> bool
Checks if the status code is of the successful class, i.e. 2xx.
Trait Implementations§
Source§impl Clone for StatusCodeClass
impl Clone for StatusCodeClass
Source§fn clone(&self) -> StatusCodeClass
fn clone(&self) -> StatusCodeClass
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatusCodeClass
impl Debug for StatusCodeClass
Source§impl Ord for StatusCodeClass
impl Ord for StatusCodeClass
Source§fn cmp(&self, other: &StatusCodeClass) -> Ordering
fn cmp(&self, other: &StatusCodeClass) -> Ordering
1.21.0 · Source§fn 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
Source§impl PartialEq for StatusCodeClass
impl PartialEq for StatusCodeClass
Source§impl PartialOrd for StatusCodeClass
impl PartialOrd for StatusCodeClass
impl Copy for StatusCodeClass
impl Eq for StatusCodeClass
impl StructuralPartialEq for StatusCodeClass
Auto Trait Implementations§
impl Freeze for StatusCodeClass
impl RefUnwindSafe for StatusCodeClass
impl Send for StatusCodeClass
impl Sync for StatusCodeClass
impl Unpin for StatusCodeClass
impl UnwindSafe for StatusCodeClass
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.