#[repr(u64)]pub enum FetchErrorCode {
InternalError = 0,
Unauthorized = 1,
Timeout = 2,
NotSupported = 3,
TrackDoesNotExist = 4,
InvalidRange = 5,
}Expand description
FETCH_ERROR codes (draft-10, Section 8.14 “FETCH_ERROR”).
Draft-10 is internally inconsistent about this registry, and the variants
below follow the table rather than the prose. Section 8.12 states that a
publisher MUST return FETCH_ERROR with error code No Objects when the
requested start is past the latest published group, and Section 8.12.1
states the same for a joining fetch against a track with no published
content. Neither the table in Section 8.14 nor any other table in draft-10
assigns No Objects a number, so it cannot be represented here and a peer
that sends it has no value this draft could have told it to use. Draft-11 is
the first to assign the code, as 0x6, which is where it has stayed since.
Variants§
InternalError = 0
Internal Error
Unauthorized
Timeout = 2
Timeout
NotSupported = 3
Not Supported
TrackDoesNotExist = 4
Track Does Not Exist
InvalidRange = 5
Invalid Range
Implementations§
Source§impl FetchErrorCode
impl FetchErrorCode
Sourcepub const ALL: &[FetchErrorCode]
pub const ALL: &[FetchErrorCode]
Every FETCH_ERROR code draft-10 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 FetchErrorCode
impl Clone for FetchErrorCode
Source§fn clone(&self) -> FetchErrorCode
fn clone(&self) -> FetchErrorCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more