#[non_exhaustive]pub enum StatusClass {
Unknown,
Ok,
Empty,
BadRequest,
NeedsLogin,
Blocked,
NotFound,
RateLimited,
ServerError,
}Expand description
How the last attempt against a site ended, in the coarsest terms that still change what to do next.
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.
Unknown
Nothing has been tried yet.
Ok
The page came back and had content.
Empty
The page came back with nothing in it. The most common quiet failure and the one worth its own slot.
BadRequest
The request was rejected as malformed.
NeedsLogin
The page is behind a sign in.
Blocked
The site refused the fetch.
NotFound
There is no such page.
RateLimited
The site asked for a slower pace.
ServerError
The site failed on its own side.
Implementations§
Source§impl StatusClass
impl StatusClass
Sourcepub const fn is_refusal(self) -> bool
pub const fn is_refusal(self) -> bool
Whether this class says the site turned the fetch away rather than failing to serve it.
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 Default for StatusClass
impl Default for StatusClass
Source§fn default() -> StatusClass
fn default() -> StatusClass
Returns the “default value” for a type. Read more
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 Forget for StatusClass
impl Freeze for StatusClass
impl Move 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