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

Returns true if self is a StatusClass of Informational (1XX). Returns false otherwise.

Returns true if self is a StatusClass of Success (2XX). Returns false otherwise.

Returns true if self is a StatusClass of Redirection (3XX). Returns false otherwise.

Returns true if self is a StatusClass of ClientError (4XX). Returns false otherwise.

Returns true if self is a StatusClass of ServerError (5XX). Returns false otherwise.

Returns true if self is a StatusClass of Unknown. Returns false otherwise.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts self into a collection.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Get the TypeId of this object.