pub enum StatusClass {
Informational,
Success,
Redirect,
ClientError,
ServerError,
}Expand description
HTTP status code classes for broad matching.
Use this to match entire categories of responses instead of specific codes.
§Examples
use hitbox_http::predicates::response::StatusClass;
// Match any 2xx response
let class = StatusClass::Success;Variants§
Informational
1xx (100-199): Informational responses.
Success
2xx (200-299): Successful responses.
Redirect
3xx (300-399): Redirection responses.
ClientError
4xx (400-499): Client error responses.
ServerError
5xx (500-599): Server error responses.
Trait Implementations§
Source§impl Clone for StatusClass
impl Clone for StatusClass
Source§fn clone(&self) -> StatusClass
fn clone(&self) -> StatusClass
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 StatusClass
Source§impl Debug for StatusClass
impl Debug for StatusClass
Source§impl<'de> Deserialize<'de> for StatusClass
impl<'de> Deserialize<'de> for StatusClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StatusClass
Source§impl PartialEq for StatusClass
impl PartialEq for StatusClass
Source§fn eq(&self, other: &StatusClass) -> bool
fn eq(&self, other: &StatusClass) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for StatusClass
impl Serialize 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
impl<T> Cacheable for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.