#[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 — 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
impl SessionErrorCode
Sourcepub const ALL: &[SessionErrorCode]
pub const ALL: &[SessionErrorCode]
Every Session Error Code draft-23 assigns, in ascending wire order:
the set Self::from_u64 accepts.
Sourcepub fn from_u64(v: u64) -> Option<Self>
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.
Sourcepub fn category(self) -> Option<SessionErrorCategory>
pub fn category(self) -> Option<SessionErrorCategory>
The Section 12.2 category of this code, None below 0x200.