pub enum HttpStatusKind {
Success,
BadRequest,
Unauthorized,
Forbidden,
NotFound,
RateLimited,
ServerError,
Other,
}Expand description
HTTP status code classification for API responses
Variants§
Success
2xx - Success
BadRequest
400 - Bad request
401 - Unauthorized
Forbidden
403 - Forbidden
NotFound
404 - Not found
RateLimited
429 - Rate limited
ServerError
5xx - Server error
Other
Other status codes
Implementations§
Source§impl HttpStatusKind
impl HttpStatusKind
Sourcepub fn from_status(status: u16) -> Self
pub fn from_status(status: u16) -> Self
Classify an HTTP status code
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this status is retryable
Trait Implementations§
Source§impl Clone for HttpStatusKind
impl Clone for HttpStatusKind
Source§fn clone(&self) -> HttpStatusKind
fn clone(&self) -> HttpStatusKind
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 HttpStatusKind
impl Debug for HttpStatusKind
Source§impl PartialEq for HttpStatusKind
impl PartialEq for HttpStatusKind
impl Copy for HttpStatusKind
impl Eq for HttpStatusKind
impl StructuralPartialEq for HttpStatusKind
Auto Trait Implementations§
impl Freeze for HttpStatusKind
impl RefUnwindSafe for HttpStatusKind
impl Send for HttpStatusKind
impl Sync for HttpStatusKind
impl Unpin for HttpStatusKind
impl UnwindSafe for HttpStatusKind
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