StatusCode

Enum StatusCode 

Source
pub enum StatusCode {
Show 49 variants Continue, Ok, MovedPermanently, Found, SeeOther, NotModified, UseProxy, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Gone, PreconditionFailed, RequestMessageBodyTooLarge, RequestURITooLong, UnsupportedMediaType, ParameterNotUnderstood, Reserved, NotEnoughBandwidth, SessionNotFound, MethodNotValidInThisState, HeaderFieldNotValidForResource, InvalidRange, ParameterIsReadOnly, AggregateOperationNotAllowed, OnlyAggregateOperationAllowed, UnsupportedTransport, DestinationUnreachable, DestinationProhibited, DataTransportNotReadyYet, NotificationReasonUnknown, KeyManagementError, ConnectionAuthorizationRequired, ConnectionCredentialsNotAccepted, FailureToEstablishSecureConnection, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, RTSPVersionNotSupported, OptionNotSupported, ProxyUnavailable, Extension(u16),
}
Expand description

RTSP response status codes.

These are defined in RFC 7826 section 17 together with their semantics for the different requests.

Variants§

§

Continue

Continue

§

Ok

Ok

§

MovedPermanently

Moved permanently

§

Found

Found

§

SeeOther

See other

§

NotModified

Not modified

§

UseProxy

Use proxy

§

BadRequest

Bad request

§

Unauthorized

Unauthorized

§

PaymentRequired

Payment required

§

Forbidden

Forbidden

§

NotFound

Not found

§

MethodNotAllowed

Method not allowed

§

NotAcceptable

Not acceptable

§

ProxyAuthenticationRequired

Proxy authentication required

§

RequestTimeout

Request timeout

§

Gone

Gone

§

PreconditionFailed

Precondition failed

§

RequestMessageBodyTooLarge

Request message body too large

§

RequestURITooLong

Request URI too long

§

UnsupportedMediaType

Unsupported media type

§

ParameterNotUnderstood

Parameter not understood

§

Reserved

Reserved

§

NotEnoughBandwidth

Not enough bandwidth

§

SessionNotFound

Session not found

§

MethodNotValidInThisState

Method not valid in this state

§

HeaderFieldNotValidForResource

Header field not valid for resource

§

InvalidRange

Invalid range

§

ParameterIsReadOnly

Parameter is read-only

§

AggregateOperationNotAllowed

Aggregate operation not allowed

§

OnlyAggregateOperationAllowed

Only aggregate operation allowed

§

UnsupportedTransport

Unsupported transport

§

DestinationUnreachable

Destination unreachable

§

DestinationProhibited

Destination prohibited

§

DataTransportNotReadyYet

Data transport not ready yet

§

NotificationReasonUnknown

Notification reason unknown

§

KeyManagementError

Key management error

§

ConnectionAuthorizationRequired

Connection authorization required

§

ConnectionCredentialsNotAccepted

Connection credentials not accepted

§

FailureToEstablishSecureConnection

Failure to establish secure connection

§

InternalServerError

Internal server error

§

NotImplemented

Not implemented

§

BadGateway

Bad gateway

§

ServiceUnavailable

Service unavailable

§

GatewayTimeout

Gateway timeout

§

RTSPVersionNotSupported

RTSP version not supported

§

OptionNotSupported

Option not supported

§

ProxyUnavailable

Proxy unavailable

§

Extension(u16)

Extension status code

Implementations§

Source§

impl StatusCode

Source

pub fn is_informational(self) -> bool

Returns true if the status code is 1xx.

Source

pub fn is_success(self) -> bool

Returns true if the status code is 2xx.

Source

pub fn is_redirection(self) -> bool

Returns true if the status code is 3xx.

Source

pub fn is_client_error(self) -> bool

Returns true if the status code is 4xx.

Source

pub fn is_server_error(self) -> bool

Returns true if the status code is 5xx.

Trait Implementations§

Source§

impl Clone for StatusCode

Source§

fn clone(&self) -> StatusCode

Returns a duplicate 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 StatusCode

Source§

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

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

impl Display for StatusCode

Provides the default reason phrase for the StatusCode.

Source§

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

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

impl From<StatusCode> for u16

Converts to the numeric value of a StatusCode.

Source§

fn from(v: StatusCode) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for StatusCode

Converts from the numeric value of a StatusCode.

Source§

fn from(v: u16) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for StatusCode

Source§

fn eq(&self, other: &StatusCode) -> 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 Copy for StatusCode

Source§

impl Eq for StatusCode

Source§

impl StructuralPartialEq for StatusCode

Auto Trait Implementations§

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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> 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.