#[repr(u64)]pub enum TrackStatusCode {
InProgress = 0,
TrackDoesNotExist = 1,
NotYetBegun = 2,
Finished = 3,
RelayStatusUnavailable = 4,
}Expand description
TRACK_STATUS Status Code values (draft-08, Section 7.24).
The draft defines these as a prose list rather than as a Code/Reason
table, so they are named from the prose. It is stricter about this field
than about the error registries above: the Status Code “MUST hold one of the
following values” and “Any other value in the Status Code field is a
malformed message”, so TrackStatusCode::from_u64 answering None is a
decode failure rather than a merely unrecognised code.
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 from_u64(v: u64) -> Option<Self>
pub fn from_u64(v: u64) -> Option<Self>
Convert a raw u64 to a TrackStatusCode, if this draft assigns it.
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 7.24 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