Enum stream_httparse::StatusCode[][src]

pub enum StatusCode {
Show variants Continue, SwitchingProtocols, OK, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultipleChoices, MovedPermanently, Found, SeeOther, NotModified, UseProxy, TemporaryRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeOut, Conflict, Gone, LengthRequired, PreconditionFailed, RequestEntityTooLarge, RequestURITooLarge, UnsupportedMediaType, RequestedRangeNotSatisfiable, ExpectationFailed, ImATeapot, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, HTTPVersionNotSupported,
}
Expand description

Represents all the known and defined StatusCodes

Variants

Continue

The Request should be continued by the Client

SwitchingProtocols

The Server acknowledges and accepts the Request to switch to another Protocol

OK

The Request has successfully been processed

Created

The Request successfully created a new Ressource

Accepted

The Request was successfully accpeted to be processed but has not been completed yet

NonAuthoritativeInformation

The returned Metainformation was not returned by the Origin-Server

NoContent

The Request was successful but there is no Data returned

ResetContent

The Request has been successfully fulfilled and the Client can clear its input Content

PartialContent

The requested partial Data has been fulfilled

MultipleChoices

The requested Ressource corresponds multiple Ressources

MovedPermanently

The Requested Data was moved to another URI

Found

The requested Ressource temporarily resides under a different URI

SeeOther

The Response to this Request can be found at a different URI

NotModified

The requested Ressource was not modified between the last Request and now

UseProxy

The Ressource can only be accessed through a Proxy

TemporaryRedirect

The requested Ressource temporarily resides under a different URI

BadRequest

The Request was not properly send or received

Unauthorized

The Request tried to access something it is not authorized to do

PaymentRequired

Reserved for future use

Forbidden

The requested Ressource is not allowed to be accessed

NotFound

The requested Ressource could not be found

MethodNotAllowed

The requested Method is not allowed for the specified Ressource

NotAcceptable

The Ressource is not capable of accepting the Request

ProxyAuthenticationRequired

The Client should first Authenticate with a Proxy and before attempting the Request again

RequestTimeOut

The Server decided that the Client took to long and the Request timed out

Conflict

Request could not complete because there was a conflict current State of the Ressource

Gone

The Ressource is no longer available

LengthRequired

The Server only accepts Requests where the Content-Length is set

PreconditionFailed

The given Precondition failed

RequestEntityTooLarge

The Request-Entity was larger than what the Server allows

RequestURITooLarge

The URI is longer than what the Server allows

UnsupportedMediaType

The Media-Type is not supported by the Server for this ressource

RequestedRangeNotSatisfiable

The Requested Range could not be satisfied by the Server

ExpectationFailed

The given Expectation has failed

ImATeapot

An April Fool’s Status-Code that some servers use for a variety of Situations

InternalServerError

The Server Processing encountered some internal Problem and could not process the Request

NotImplemented

Some requested Functionality is not implemented on the Server

BadGateway

An Error occured at a Gateway while sending the Request to the Target-Server

ServiceUnavailable

The requested Service is currently unavailable

GatewayTimeout

The Gateway did not received a Response in time

HTTPVersionNotSupported

The requested HTTP-Version is not supported by the Server

Implementations

impl StatusCode[src]

pub fn parse(raw: &str) -> Option<Self>[src]

Parses the Raw Response Status-Code to the enum

pub fn serialize(&self) -> &'static str[src]

Serialzes the given StatusCode

Trait Implementations

impl Debug for StatusCode[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl PartialEq<StatusCode> for StatusCode[src]

fn eq(&self, other: &StatusCode) -> bool[src]

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl StructuralPartialEq for StatusCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.