Enum rocket_http::StatusClass
source · pub enum StatusClass {
Informational,
Success,
Redirection,
ClientError,
ServerError,
Unknown,
}
Expand description
Enumeration of HTTP status classes.
Variants§
Informational
Indicates a provisional response: a status code of 1XX.
Success
Indicates that a request has succeeded: a status code of 2XX.
Redirection
Indicates that further action needs to be taken by the user agent in order to fulfill the request: a status code of 3XX.
ClientError
Intended for cases in which the client seems to have erred: a status code of 4XX.
ServerError
Indicates cases in which the server is aware that it has erred or is incapable of performing the request: a status code of 5XX.
Unknown
Indicates that the status code is nonstandard and unknown: all other status codes.
Implementations§
source§impl StatusClass
impl StatusClass
sourcepub fn is_informational(&self) -> bool
pub fn is_informational(&self) -> bool
Returns true
if self
is a StatusClass
of
Informational
(1XX).
Returns false
otherwise.
sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Returns true
if self
is a StatusClass
of
Success
(2XX).
Returns false
otherwise.
sourcepub fn is_redirection(&self) -> bool
pub fn is_redirection(&self) -> bool
Returns true
if self
is a StatusClass
of
Redirection
(3XX).
Returns false
otherwise.
sourcepub fn is_client_error(&self) -> bool
pub fn is_client_error(&self) -> bool
Returns true
if self
is a StatusClass
of
ClientError
(4XX).
Returns false
otherwise.
sourcepub fn is_server_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Returns true
if self
is a StatusClass
of
ServerError
(5XX).
Returns false
otherwise.
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true
if self
is a StatusClass
of
Unknown
.
Returns false
otherwise.
Trait Implementations§
source§impl Clone for StatusClass
impl Clone for StatusClass
source§fn clone(&self) -> StatusClass
fn clone(&self) -> StatusClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StatusClass
impl Debug for StatusClass
source§impl Hash for StatusClass
impl Hash for StatusClass
source§impl PartialEq<StatusClass> for StatusClass
impl PartialEq<StatusClass> for StatusClass
source§fn eq(&self, other: &StatusClass) -> bool
fn eq(&self, other: &StatusClass) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for StatusClass
impl Eq for StatusClass
impl StructuralEq for StatusClass
impl StructuralPartialEq for StatusClass
Auto Trait Implementations§
impl RefUnwindSafe for StatusClass
impl Send for StatusClass
impl Sync for StatusClass
impl Unpin for StatusClass
impl UnwindSafe for StatusClass
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.