#[repr(u64)]pub enum RequestErrorCode {
InternalError = 0,
Unauthorized = 1,
Timeout = 2,
NotSupported = 3,
TrackDoesNotExist = 4,
InvalidRange = 5,
MalformedAuthToken = 16,
ExpiredAuthToken = 18,
}Expand description
SUBSCRIBE_ERROR codes, from the “SUBSCRIBE_ERROR Codes” registry in draft-ietf-moq-transport-14 Section 13.1.2. Every row cites Section 9.9 (SUBSCRIBE_ERROR), the source of the descriptions below.
This type decodes SUBSCRIBE_ERROR only. It is not a shared request-level registry: draft-14 gives each request-scoped message its own registry, and they disagree at 0x4. Decoding another message’s error code with this type silently produces the wrong variant.
| code | SUBSCRIBE_ERROR | PUBLISH_ERROR | FETCH_ERROR | ANNOUNCE_ERROR | SUBSCRIBE_NAMESPACE_ERROR |
|---|---|---|---|---|---|
| 0x4 | TRACK_DOES_NOT_EXIST | UNINTERESTED | TRACK_DOES_NOT_EXIST | UNINTERESTED | NAMESPACE_PREFIX_UNKNOWN |
Use PublishErrorCode, FetchErrorCode, AnnounceErrorCode and
SubscribeNamespaceErrorCode for those messages.
The name is RequestErrorCode for compatibility with existing callers; the
registry it transcribes is SUBSCRIBE_ERROR.
Variants§
InternalError = 0
INTERNAL_ERROR — An implementation specific or generic error occurred.
UNAUTHORIZED — The subscriber is not authorized to subscribe to the
given track.
Timeout = 2
TIMEOUT — The subscription could not be completed before an
implementation specific timeout. For example, a relay could not establish
an upstream subscription within the timeout.
NotSupported = 3
NOT_SUPPORTED — The endpoint does not support the SUBSCRIBE method.
TrackDoesNotExist = 4
TRACK_DOES_NOT_EXIST — The requested track is not available at the
publisher.
InvalidRange = 5
INVALID_RANGE — The end of the SUBSCRIBE range is earlier than the
beginning, or the end of the range has already been published.
MalformedAuthToken = 16
MALFORMED_AUTH_TOKEN — Invalid Auth Token serialization during
registration (see Section 9.2.1.1).
ExpiredAuthToken = 18
EXPIRED_AUTH_TOKEN — Authorization token has expired
(Section 9.2.1.1).
Implementations§
Source§impl RequestErrorCode
impl RequestErrorCode
Sourcepub const ALL: &[RequestErrorCode]
pub const ALL: &[RequestErrorCode]
Every SUBSCRIBE_ERROR code draft-14 assigns, in ascending wire order.
This is the set Self::from_u64 accepts, written out so that it can
be enumerated: nothing can iterate an enum’s variants, so a caller that
wants the registry has to be handed it. Writing it down is also what
lets a test state its claims about the registry itself rather than about
the range some sweep happens to reach.
Trait Implementations§
Source§impl Clone for RequestErrorCode
impl Clone for RequestErrorCode
Source§fn clone(&self) -> RequestErrorCode
fn clone(&self) -> RequestErrorCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more