#[repr(u8)]pub enum ObjectStatus {
Normal = 0,
ObjectDoesNotExist = 1,
EndOfGroup = 3,
EndOfTrack = 4,
}Expand description
Object status values, from MoQ Transport draft-14 Section 10.2.1.1 “Object Status”.
Status is a varint on the wire. The draft assigns 0x0, 0x1, 0x3 and 0x4, and
says of everything else: “Any other value SHOULD be treated as a protocol
error and the session SHOULD be terminated with a PROTOCOL_VIOLATION”.
ObjectStatus::from_u64 answers None for 0x2 and for every other
unassigned value.
Variants§
Normal = 0
Normal object. Implicit for non-zero length; zero-length objects must encode this explicitly.
ObjectDoesNotExist = 1
This Object does not exist at any publisher.
EndOfGroup = 3
End of Group. Object ID is one greater than the largest in the group (or 0 if the group is empty).
EndOfTrack = 4
End of Track.
Implementations§
Source§impl ObjectStatus
impl ObjectStatus
Sourcepub const ALL: &[ObjectStatus]
pub const ALL: &[ObjectStatus]
Every status draft-14 assigns, in ascending wire order.
This is exactly the set ObjectStatus::from_u64 accepts. Any other
value is one the draft does not assign.
Sourcepub fn from_u64(v: u64) -> Option<Self>
pub fn from_u64(v: u64) -> Option<Self>
Convert a raw wire value to ObjectStatus, or None if draft-14 does
not assign that value.
Trait Implementations§
Source§impl Clone for ObjectStatus
impl Clone for ObjectStatus
Source§fn clone(&self) -> ObjectStatus
fn clone(&self) -> ObjectStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more