Struct Status

Source
pub struct Status(/* private fields */);
Expand description

Represents a HTTP status code.

Implementations§

Source§

impl Status

Source

pub const Continue: Status

Status with code 100 .

Source

pub const SwitchingProtocols: Status

Status with code 101 .

Source

pub const Processing: Status

Status with code 102 .

Source

pub const Ok: Status

Status with code 200 .

Source

pub const Created: Status

Status with code 201 .

Source

pub const Accepted: Status

Status with code 202 .

Source

pub const NonAuthoritativeInformation: Status

Status with code 203 .

Source

pub const NoContent: Status

Status with code 204 .

Source

pub const ResetContent: Status

Status with code 205 .

Source

pub const PartialContent: Status

Status with code 206 .

Source

pub const MultiStatus: Status

Status with code 207 .

Source

pub const AlreadyReported: Status

Status with code 208 .

Source

pub const ImUsed: Status

Status with code 226 .

Source

pub const MultipleChoices: Status

Status with code 300 .

Source

pub const MovedPermanently: Status

Status with code 301 .

Source

pub const Found: Status

Status with code 302 .

Source

pub const SeeOther: Status

Status with code 303 .

Source

pub const NotModified: Status

Status with code 304 .

Source

pub const UseProxy: Status

Status with code 305 .

Source

pub const TemporaryRedirect: Status

Status with code 307 .

Source

pub const PermanentRedirect: Status

Status with code 308 .

Source

pub const BadRequest: Status

Status with code 400 .

Source

pub const Unauthorized: Status

Status with code 401 .

Source

pub const PaymentRequired: Status

Status with code 402 .

Source

pub const Forbidden: Status

Status with code 403 .

Source

pub const NotFound: Status

Status with code 404 .

Source

pub const MethodNotAllowed: Status

Status with code 405 .

Source

pub const NotAcceptable: Status

Status with code 406 .

Source

pub const ProxyAuthenticationRequired: Status

Status with code 407 .

Source

pub const RequestTimeout: Status

Status with code 408 .

Source

pub const Conflict: Status

Status with code 409 .

Source

pub const Gone: Status

Status with code 410 .

Source

pub const LengthRequired: Status

Status with code 411 .

Source

pub const PreconditionFailed: Status

Status with code 412 .

Source

pub const PayloadTooLarge: Status

Status with code 413 .

Source

pub const UriTooLong: Status

Status with code 414 .

Source

pub const UnsupportedMediaType: Status

Status with code 415 .

Source

pub const RangeNotSatisfiable: Status

Status with code 416 .

Source

pub const ExpectationFailed: Status

Status with code 417 .

Source

pub const ImATeapot: Status

Status with code 418 .

Source

pub const MisdirectedRequest: Status

Status with code 421 .

Source

pub const UnprocessableEntity: Status

Status with code 422 .

Source

pub const Locked: Status

Status with code 423 .

Source

pub const FailedDependency: Status

Status with code 424 .

Source

pub const UpgradeRequired: Status

Status with code 426 .

Source

pub const PreconditionRequired: Status

Status with code 428 .

Source

pub const TooManyRequests: Status

Status with code 429 .

Source

pub const RequestHeaderFieldsTooLarge: Status

Status with code 431 .

Source

pub const UnavailableForLegalReasons: Status

Status with code 451 .

Source

pub const InternalServerError: Status

Status with code 500 .

Source

pub const NotImplemented: Status

Status with code 501 .

Source

pub const BadGateway: Status

Status with code 502 .

Source

pub const ServiceUnavailable: Status

Status with code 503 .

Source

pub const GatewayTimeout: Status

Status with code 504 .

Source

pub const HttpVersionNotSupported: Status

Status with code 505 .

Source

pub const VariantAlsoNegotiates: Status

Status with code 506 .

Source

pub const InsufficientStorage: Status

Status with code 507 .

Source

pub const LoopDetected: Status

Status with code 508 .

Source

pub const NotExtended: Status

Status with code 510 .

Source

pub const NetworkAuthenticationRequired: Status

Status with code 511 .

Source

pub fn from_code(code: u16) -> Self

Returns a Status given a status code code.

§Examples

Create a Status from a status code code:

use azure_functions::http::Status;

assert_eq!(Status::from_code(404), Status::NotFound);

Trait Implementations§

Source§

impl Clone for Status

Source§

fn clone(&self) -> Status

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Status

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Status

Source§

fn default() -> Status

Returns the “default value” for a type. Read more
Source§

impl From<u16> for Status

Source§

fn from(code: u16) -> Self

Converts to this type from the input type.
Source§

impl Hash for Status

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

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

impl PartialEq for Status

Source§

fn eq(&self, other: &Status) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToString for Status

Source§

fn to_string(&self) -> String

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

impl Copy for Status

Source§

impl Eq for Status

Source§

impl StructuralPartialEq for Status

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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