Enum rocket::http::StatusClass
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§
§impl StatusClass
impl StatusClass
pub fn is_informational(&self) -> bool
pub fn is_informational(&self) -> bool
Returns true
if self
is a StatusClass
of
Informational
(1XX).
Returns false
otherwise.
pub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Returns true
if self
is a StatusClass
of
Success
(2XX).
Returns false
otherwise.
pub fn is_redirection(&self) -> bool
pub fn is_redirection(&self) -> bool
Returns true
if self
is a StatusClass
of
Redirection
(3XX).
Returns false
otherwise.
pub 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.
pub 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.
pub 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§
§impl Clone for StatusClass
impl Clone for StatusClass
§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 more§impl Debug for StatusClass
impl Debug for StatusClass
§impl Hash for StatusClass
impl Hash for StatusClass
§impl PartialEq for StatusClass
impl PartialEq for StatusClass
impl Copy for StatusClass
impl Eq 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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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
key
and return true
if they are equal.