#[non_exhaustive]pub enum StatusClass {
Informational,
Success,
Redirection,
ClientError,
ServerError,
}Expand description
The class of a status code (RFC 9110 section 15).
§Examples
use http_net::{StatusClass, status_class};
assert_eq!(status_class(302), Some(StatusClass::Redirection));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Informational
1xx: interim, the request was received and processing continues.
Success
2xx: the request was successfully received, understood, and accepted.
Redirection
3xx: further action is needed to complete the request.
ClientError
4xx: the request is wrong or cannot be fulfilled.
ServerError
5xx: the server failed to fulfil a valid request.
Trait Implementations§
Source§impl Clone for StatusClass
impl Clone for StatusClass
impl Copy for StatusClass
Source§impl Debug for StatusClass
impl Debug for StatusClass
impl Eq for StatusClass
Source§impl Hash for StatusClass
impl Hash for StatusClass
Source§impl PartialEq for StatusClass
impl PartialEq for StatusClass
impl StructuralPartialEq for StatusClass
Auto Trait Implementations§
impl Freeze for StatusClass
impl RefUnwindSafe for StatusClass
impl Send for StatusClass
impl Sync for StatusClass
impl Unpin for StatusClass
impl UnsafeUnpin for StatusClass
impl UnwindSafe for StatusClass
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