moqtap_codec/draft18/types.rs
1//! Draft-18 object status values (unchanged from draft-17).
2//!
3//! - 0x0 = Normal
4//! - 0x3 = End of Group
5//! - 0x4 = End of Track
6
7/// Object status values (draft-18).
8#[derive(Debug, Clone, Copy, PartialEq, Eq)]
9#[repr(u8)]
10pub enum ObjectStatus {
11 Normal = 0x0,
12 EndOfGroup = 0x3,
13 EndOfTrack = 0x4,
14}
15
16impl ObjectStatus {
17 pub fn from_u64(v: u64) -> Option<Self> {
18 match v {
19 0x0 => Some(ObjectStatus::Normal),
20 0x3 => Some(ObjectStatus::EndOfGroup),
21 0x4 => Some(ObjectStatus::EndOfTrack),
22 _ => None,
23 }
24 }
25}