#[repr(u64)]pub enum TrackStatusCode {
InProgress = 0,
TrackDoesNotExist = 1,
NotYetBegun = 2,
Finished = 3,
RelayStatusUnavailable = 4,
}Expand description
TRACK_STATUS status codes, carried in the Status Code field of the TRACK_STATUS message.
Draft-11 section 8.18 defines these as a prose list rather than as a
Code/Reason table, which is why they are named from the prose here. The
draft is stricter about this field than about the error registries above: it
says the Status Code MUST hold one of these values and that any other value
is a malformed message, so from_u64 returning None is a decode failure
rather than a merely unrecognised code.
The draft also carries an unresolved editorial note about authorization failures in this section, so a later draft may add codes here.
Variants§
InProgress = 0
The track is in progress, and subsequent fields contain the highest group and object ID for that track.
TrackDoesNotExist = 1
The track does not exist. Subsequent fields MUST be zero, and any other value is a malformed message.
NotYetBegun = 2
The track has not yet begun. Subsequent fields MUST be zero, and any other value is a malformed message.
Finished = 3
The track has finished, so there is no live edge. Subsequent fields contain the highest group and object ID known.
The publisher is a relay that cannot obtain the current track status from upstream. Subsequent fields contain the largest group and object ID known.
Implementations§
Source§impl TrackStatusCode
impl TrackStatusCode
Sourcepub fn requires_zero_location(self) -> bool
pub fn requires_zero_location(self) -> bool
Whether this code requires the fields after it to be zero.
Section 8.18 says of 0x01 “Subsequent fields MUST be zero, and any other value is a malformed message”, and the same of 0x02. The other three codes describe those fields as carrying a real location, so they place no requirement on them.
Trait Implementations§
Source§impl Clone for TrackStatusCode
impl Clone for TrackStatusCode
Source§fn clone(&self) -> TrackStatusCode
fn clone(&self) -> TrackStatusCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more