#[repr(u64)]pub enum SubscribeErrorCode {
InternalError = 0,
Unauthorized = 1,
Timeout = 2,
NotSupported = 3,
TrackDoesNotExist = 4,
InvalidRange = 5,
RetryTrackAlias = 6,
}Expand description
SUBSCRIBE_ERROR codes, from draft-09 Section 7.16 (SUBSCRIBE_ERROR).
The draft introduces the table with “The application SHOULD use a relevant error code in SUBSCRIBE_ERROR, as defined below”.
Variants§
InternalError = 0
Internal Error.
Unauthorized.
Timeout = 2
Timeout.
NotSupported = 3
Not Supported.
TrackDoesNotExist = 4
Track Does Not Exist.
InvalidRange = 5
Invalid Range — Section 7.4 adds that if a publisher cannot satisfy
the requested start or end, or if the end has already been published, it
SHOULD send a SUBSCRIBE_ERROR with this code.
RetryTrackAlias = 6
Retry Track Alias — Section 7.16 adds that the subscriber SHOULD
re-issue the SUBSCRIBE with the Track Alias carried in the
SUBSCRIBE_ERROR message instead. If that Track Alias is already in use,
the subscriber MUST close the connection with a Duplicate Track Alias
error (Section 3.5).
Implementations§
Source§impl SubscribeErrorCode
impl SubscribeErrorCode
Sourcepub const ALL: &[SubscribeErrorCode]
pub const ALL: &[SubscribeErrorCode]
Every SUBSCRIBE_ERROR code draft-09 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 SubscribeErrorCode
impl Clone for SubscribeErrorCode
Source§fn clone(&self) -> SubscribeErrorCode
fn clone(&self) -> SubscribeErrorCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more