Skip to main content

SessionErrorCode

Enum SessionErrorCode 

Source
#[repr(u64)]
pub enum SessionErrorCode {
Show 33 variants NoError = 0, InternalError = 1, Unauthorized = 2, ProtocolViolation = 3, InvalidRequestId = 4, DuplicateTrackAlias = 5, MalformedKeyValue = 6, InvalidPath = 8, MalformedPath = 9, GoawayTimeout = 16, ControlMessageTimeout = 17, DataStreamTimeout = 18, AuthTokenCacheOverflow = 19, DuplicateAuthTokenAlias = 20, MalformedAuthToken = 22, UnknownAuthTokenAlias = 23, ExpiredAuthToken = 24, InvalidAuthority = 25, MalformedAuthority = 26, TooManyRequestUpdates = 27, InvalidStreamHeader = 512, MalformedObject = 513, InvalidObjectStatus = 514, TruncatedObject = 515, MalformedMessage = 768, InvalidField = 769, InvalidTrackNamespace = 770, UnexpectedMessage = 771, RoleViolation = 772, InvalidParameter = 773, ClosedControlStream = 774, DeltaEncodingOverflow = 1_024, FieldLengthExceeded = 1_025,
}
Expand description

Session termination error codes (draft-23 Section 16.12.1, Table 20).

Sent as the error code when closing the Transport Session. The per-code definitions are in Section 12.2, which also groups 0x200-0x4FF: “Codes from 0x200 to 0x4FF are organized into ranges by category”. See SessionErrorCategory.

Variants§

§

NoError = 0

NO_ERROR — The session is being terminated without an error.

§

InternalError = 1

INTERNAL_ERROR — An implementation specific error occurred.

§

Unauthorized = 2

UNAUTHORIZED — The client is not authorized to establish a session.

§

ProtocolViolation = 3

PROTOCOL_VIOLATION — The remote endpoint performed an action that was disallowed by the specification and no more specific code applies.

§

InvalidRequestId = 4

INVALID_REQUEST_ID — The endpoint received a Request ID with an incorrect least significant bit for the sender, or a duplicate Request ID. See Section 6.4.2.1.

§

DuplicateTrackAlias = 5

DUPLICATE_TRACK_ALIAS — The endpoint attempted to use a Track Alias that was already in use.

§

MalformedKeyValue = 6

MALFORMED_KEY_VALUE — A Key-Value-Pair (Figure 4), such as a Setup Option or a Property, has a Value that does not match the definition of its Type.

§

InvalidPath = 8

INVALID_PATH — The PATH parameter was used by a server, on a WebTransport session, or the server does not support the path.

§

MalformedPath = 9

MALFORMED_PATH — The PATH parameter does not conform to the rules in Section 9.1.2.

§

GoawayTimeout = 16

GOAWAY_TIMEOUT — The session was closed because the peer took too long to close the session in response to a GOAWAY (Section 9.2) message. See session migration (Section 6.6.1).

§

ControlMessageTimeout = 17

CONTROL_MESSAGE_TIMEOUT — The session was closed because the peer took too long to respond to a control message.

§

DataStreamTimeout = 18

DATA_STREAM_TIMEOUT — The session was closed because the peer took too long to send data expected on an open Data Stream (see Section 11).

§

AuthTokenCacheOverflow = 19

AUTH_TOKEN_CACHE_OVERFLOW — The Session limit Section 9.1.3 of the size of all registered Authorization tokens has been exceeded.

§

DuplicateAuthTokenAlias = 20

DUPLICATE_AUTH_TOKEN_ALIAS — Authorization Token attempted to register an Alias that was in use (see Section 8.9).

§

MalformedAuthToken = 22

MALFORMED_AUTH_TOKEN — Invalid Auth Token serialization (see Section 8.9).

§

UnknownAuthTokenAlias = 23

UNKNOWN_AUTH_TOKEN_ALIAS — No registered token found for the provided Alias (see Section 8.9).

§

ExpiredAuthToken = 24

EXPIRED_AUTH_TOKEN — Authorization token has expired (Section 8.9).

§

InvalidAuthority = 25

INVALID_AUTHORITY — The specified AUTHORITY does not correspond to this server or cannot be used in this context.

§

MalformedAuthority = 26

MALFORMED_AUTHORITY — The AUTHORITY value is syntactically invalid.

§

TooManyRequestUpdates = 27

TOO_MANY_REQUEST_UPDATES — The endpoint received a REQUEST_UPDATE that exceeded the per-stream limit communicated via the MAX_REQUEST_UPDATES Setup Option (Section 9.1.7).

§

InvalidStreamHeader = 512

INVALID_STREAM_HEADER — A data stream or datagram has an unknown type or invalid Type Flags.

§

MalformedObject = 513

MALFORMED_OBJECT — The serialization of an Object on a data stream or in a datagram cannot be decoded, for example a flag references a prior Object that does not exist.

§

InvalidObjectStatus = 514

INVALID_OBJECT_STATUS — An Object has an invalid Object Status, or has Properties when its status is not Normal.

§

TruncatedObject = 515

TRUNCATED_OBJECT — A data stream ended with a FIN in the middle of an Object.

§

MalformedMessage = 768

MALFORMED_MESSAGE — A control message cannot be parsed or is missing a required element, for example its length does not match its contents.

§

InvalidField = 769

INVALID_FIELD — A control message was parsed, but a field has a value that is not allowed.

§

InvalidTrackNamespace = 770

INVALID_TRACK_NAMESPACE — A Track Namespace does not conform to Section 8.7.

§

UnexpectedMessage = 771

UNEXPECTED_MESSAGE — A control message of an unknown type was received, or a message was received on the wrong stream, in the wrong order, or more times than allowed.

§

RoleViolation = 772

ROLE_VIOLATION — The peer sent a message or field that is not allowed for its role, for example a server receiving a non-empty New Session URI.

§

InvalidParameter = 773

INVALID_PARAMETER — A Message Parameter (Section 9.19) is unknown, duplicated, not allowed in the message, or has a value outside its allowed range.

§

ClosedControlStream = 774

CLOSED_CONTROL_STREAM — The peer closed the control stream (Section 6.3).

§

DeltaEncodingOverflow = 1_024

DELTA_ENCODING_OVERFLOW — A value decoded from a delta encoding is less than 0 or greater than 2^64 - 1.

§

FieldLengthExceeded = 1_025

FIELD_LENGTH_EXCEEDED — A field or structure is longer than its maximum allowed length.

Implementations§

Source§

impl SessionErrorCode

Source

pub const ALL: &[SessionErrorCode]

Every Session Error Code draft-23 assigns, in ascending wire order: the set Self::from_u64 accepts.

Source

pub fn from_u64(v: u64) -> Option<Self>

Convert a raw u64 to a SessionErrorCode, if the draft assigns that code point. None for any unassigned value, including the greasing range.

Source

pub fn as_u64(self) -> u64

Return the raw u64 value of this error code.

Source

pub fn category(self) -> Option<SessionErrorCategory>

The Section 12.2 category of this code, None below 0x200.

Trait Implementations§

Source§

impl Clone for SessionErrorCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for SessionErrorCode

Source§

impl Debug for SessionErrorCode

Source§

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

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

impl Eq for SessionErrorCode

Source§

impl PartialEq for SessionErrorCode

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SessionErrorCode

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.