Enum rocket_http::StatusClass [−][src]
pub enum StatusClass { Informational, Success, Redirection, ClientError, ServerError, Unknown, }
Expand description
Enumeration of HTTP status classes.
Variants
Indicates a provisional response: a status code of 1XX.
Indicates that a request has succeeded: a status code of 2XX.
Indicates that further action needs to be taken by the user agent in order to fulfill the request: a status code of 3XX.
Intended for cases in which the client seems to have erred: a status code of 4XX.
Indicates cases in which the server is aware that it has erred or is incapable of performing the request: a status code of 5XX.
Indicates that the status code is nonstandard and unknown: all other status codes.
Implementations
impl StatusClass
[src]
impl StatusClass
[src]pub fn is_informational(&self) -> bool
[src]
pub fn is_informational(&self) -> bool
[src]Returns true
if self
is a StatusClass
of
Informational
(1XX).
Returns false
otherwise.
pub fn is_success(&self) -> bool
[src]
pub fn is_success(&self) -> bool
[src]Returns true
if self
is a StatusClass
of
Success
(2XX).
Returns false
otherwise.
pub fn is_redirection(&self) -> bool
[src]
pub fn is_redirection(&self) -> bool
[src]Returns true
if self
is a StatusClass
of
Redirection
(3XX).
Returns false
otherwise.
pub fn is_client_error(&self) -> bool
[src]
pub fn is_client_error(&self) -> bool
[src]Returns true
if self
is a StatusClass
of
ClientError
(4XX).
Returns false
otherwise.
pub fn is_server_error(&self) -> bool
[src]
pub fn is_server_error(&self) -> bool
[src]Returns true
if self
is a StatusClass
of
ServerError
(5XX).
Returns false
otherwise.
pub fn is_unknown(&self) -> bool
[src]
pub fn is_unknown(&self) -> bool
[src]Returns true
if self
is a StatusClass
of
Unknown
.
Returns false
otherwise.
Trait Implementations
impl Clone for StatusClass
[src]
impl Clone for StatusClass
[src]fn clone(&self) -> StatusClass
[src]
fn clone(&self) -> StatusClass
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for StatusClass
[src]
impl Debug for StatusClass
[src]impl Hash for StatusClass
[src]
impl Hash for StatusClass
[src]impl PartialEq<StatusClass> for StatusClass
[src]
impl PartialEq<StatusClass> for StatusClass
[src]impl Copy for StatusClass
[src]
impl Eq for StatusClass
[src]
impl StructuralEq for StatusClass
[src]
impl StructuralPartialEq for StatusClass
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> IntoCollection<T> for T
[src]
impl<T> IntoCollection<T> for T
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more