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
sourceimpl 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
sourceimpl Clone for StatusClass
impl Clone for StatusClass
sourcefn clone(&self) -> StatusClass
fn clone(&self) -> StatusClass
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for StatusClass
impl Debug for StatusClass
sourceimpl Hash for StatusClass
impl Hash for StatusClass
sourceimpl PartialEq<StatusClass> for StatusClass
impl PartialEq<StatusClass> for StatusClass
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
sourcefn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self into a collection.
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
F: FnMut(T) -> U,
A: Array<Item = U>,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more