Enum Status

Source
pub enum Status {
Show 61 variants Continue, SwitchingProtocols, Processing, EarlyHints, Ok, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultiStatus, AlreadyReported, IMUsed, MultipleChoices, MovedPermanently, Found, SeeOther, NotModified, UseProxy, TemporaryRedirect, PermanentRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, PreconditionFailed, PayloadTooLarge, URITooLong, UnsupportedMediaType, RangeNotSatisfiable, ExpectationFailed, MisdirectedRequest, UnprocessableEntity, Locked, FailedDependency, TooEarly, UpgradeRequired, PreconditionRequired, TooManyRequests, RequestHeaderFieldsTooLarge, UnavailableForLegalReasons, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, HTTPVersionNotSupported, VariantAlsoNegotiates, InsufficientStorage, LoopDetected, NotExtended, NetworkAuthenticationRequired,
}
Expand description

Status Code of Response.

Variants§

§

Continue

100 – Continue, see [RFC7231, Section 6.2.1].

§

SwitchingProtocols

101 – Switching Protocols, see [RFC7231, Section 6.2.2].

§

Processing

102 – Processing, see [RFC2518].

§

EarlyHints

103 – Early Hints, see [RFC8297].

§

Ok

200 – OK, see [RFC7231, Section 6.3.1].

§

Created

201 – Created, see [RFC7231, Section 6.3.2].

§

Accepted

202 – Accepted, see [RFC7231, Section 6.3.3].

§

NonAuthoritativeInformation

203 – Non-Authoritative Information, see [RFC7231, Section 6.3.4].

§

NoContent

204 – No Content, see [RFC7231, Section 6.3.5].

§

ResetContent

205 – Reset Content, see [RFC7231, Section 6.3.6].

§

PartialContent

206 – Partial Content, see [RFC7233, Section 4.1].

§

MultiStatus

207 – Multi-Status, see [RFC4918].

§

AlreadyReported

208 – Already Reported, see [RFC5842].

§

IMUsed

226 – IM Used, see [RFC3229].

§

MultipleChoices

300 – Multiple Choices, see [RFC7231, Section 6.4.1].

§

MovedPermanently

301 – Moved Permanently, see [RFC7231, Section 6.4.2].

§

Found

302 – Found, see [RFC7231, Section 6.4.3].

§

SeeOther

303 – See Other, see [RFC7231, Section 6.4.4].

§

NotModified

304 – Not Modified, see [RFC7232, Section 4.1].

§

UseProxy

305 – Use Proxy, see [RFC7231, Section 6.4.5].

§

TemporaryRedirect

307 – Temporary Redirect, see [RFC7231, Section 6.4.7].

§

PermanentRedirect

308 – Permanent Redirect, see [RFC7538].

§

BadRequest

400 – Bad Request, see [RFC7231, Section 6.5.1].

§

Unauthorized

401 – Unauthorized, see [RFC7235, Section 3.1].

§

PaymentRequired

402 – Payment Required, see [RFC7231, Section 6.5.2].

§

Forbidden

403 – Forbidden, see [RFC7231, Section 6.5.3].

§

NotFound

404 – Not Found, see [RFC7231, Section 6.5.4].

§

MethodNotAllowed

405 – Method Not Allowed, see [RFC7231, Section 6.5.5].

§

NotAcceptable

406 – Not Acceptable, see [RFC7231, Section 6.5.6].

§

ProxyAuthenticationRequired

407 – Proxy Authentication Required, see [RFC7235, Section 3.2].

§

RequestTimeout

408 – Request Timeout, see [RFC7231, Section 6.5.7].

§

Conflict

409 – Conflict, see [RFC7231, Section 6.5.8].

§

Gone

410 – Gone, see [RFC7231, Section 6.5.9].

§

LengthRequired

411 – Length Required, see [RFC7231, Section 6.5.10].

§

PreconditionFailed

412 – Precondition Failed, see [RFC7232, Section 4.2][RFC8144, Section 3.2].

§

PayloadTooLarge

413 – Payload Too Large, see [RFC7231, Section 6.5.11].

§

URITooLong

414 – URI Too Long, see [RFC7231, Section 6.5.12].

§

UnsupportedMediaType

415 – Unsupported Media Type, see [RFC7231, Section 6.5.13][RFC7694, Section 3].

§

RangeNotSatisfiable

416 – Range Not Satisfiable, see [RFC7233, Section 4.4].

§

ExpectationFailed

417 – Expectation Failed, see [RFC7231, Section 6.5.14].

§

MisdirectedRequest

421 – Misdirected Request, see [RFC7540, Section 9.1.2].

§

UnprocessableEntity

422 – Unprocessable Entity, see [RFC4918].

§

Locked

423 – Locked, see [RFC4918].

§

FailedDependency

424 – Failed Dependency, see [RFC4918].

§

TooEarly

425 – Too Early, see [RFC8470].

§

UpgradeRequired

426 – Upgrade Required, see [RFC7231, Section 6.5.15].

§

PreconditionRequired

428 – Precondition Required, see [RFC6585].

§

TooManyRequests

429 – Too Many Requests, see [RFC6585].

§

RequestHeaderFieldsTooLarge

431 – Request Header Fields Too Large, see [RFC6585].

§

UnavailableForLegalReasons

451 – Unavailable For Legal Reasons, see [RFC7725].

§

InternalServerError

500 – Internal Server Error, see [RFC7231, Section 6.6.1].

§

NotImplemented

501 – Not Implemented, see [RFC7231, Section 6.6.2].

§

BadGateway

502 – Bad Gateway, see [RFC7231, Section 6.6.3].

§

ServiceUnavailable

503 – Service Unavailable, see [RFC7231, Section 6.6.4].

§

GatewayTimeout

504 – Gateway Timeout, see [RFC7231, Section 6.6.5].

§

HTTPVersionNotSupported

505 – HTTP Version Not Supported, see [RFC7231, Section 6.6.6].

§

VariantAlsoNegotiates

506 – Variant Also Negotiates, see [RFC2295].

§

InsufficientStorage

507 – Insufficient Storage, see [RFC4918].

§

LoopDetected

508 – Loop Detected, see [RFC5842].

§

NotExtended

510 – Not Extended, see [RFC2774].

§

NetworkAuthenticationRequired

511 – Network Authentication Required, see [RFC6585].

Trait Implementations§

Source§

impl Display for Status

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Status

§

impl RefUnwindSafe for Status

§

impl Send for Status

§

impl Sync for Status

§

impl Unpin for Status

§

impl UnwindSafe for Status

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more