pub struct PrimerPack {
pub entries: Vec<(u16, UlBytes)>,
}Expand description
The Primer Pack — SMPTE ST 377-1:2019 §9.2, Tables 13-15: a Batch of
{local_tag: u16, uid: AUID} entries, scoped to the single Partition
that contains it (§9.2 — never accumulated across Partitions).
Fields§
§entries: Vec<(u16, UlBytes)>Every local-tag -> UL/UUID mapping in this Partition’s Header Metadata.
Implementations§
Source§impl PrimerPack
impl PrimerPack
Sourcepub fn is_primer_key(key: &UlBytes) -> bool
pub fn is_primer_key(key: &UlBytes) -> bool
True if key is the Primer Pack Key (Table 13), ignoring byte 8
(registry version, wildcard).
Sourcepub fn resolve_ul(&self, ul: &UlBytes) -> Option<u16>
pub fn resolve_ul(&self, ul: &UlBytes) -> Option<u16>
Resolve a UL/UUID to its local tag in this Primer Pack, if present.
Used to decode “dyn” (dynamically-allocated-tag) properties whose
static tag the spec deliberately does not fix (docs/st377-1.md’s
Annex A tables) — e.g. Preface’s IsRIPPresent.
Sourcepub fn resolve_tag(&self, tag: u16) -> Option<UlBytes>
pub fn resolve_tag(&self, tag: u16) -> Option<UlBytes>
Look up the UL/UUID for a local tag, if present.
Sourcepub fn parse_prefix(bytes: &[u8]) -> Result<(Self, usize)>
pub fn parse_prefix(bytes: &[u8]) -> Result<(Self, usize)>
Parse a Primer Pack (Key + Length + Value) from bytes, validating
the Key and consuming exactly one KLV item’s worth. Also usable in a
stream context via the returned consumed-byte count.
Trait Implementations§
Source§impl Clone for PrimerPack
impl Clone for PrimerPack
Source§fn clone(&self) -> PrimerPack
fn clone(&self) -> PrimerPack
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PrimerPack
impl Debug for PrimerPack
Source§impl Default for PrimerPack
impl Default for PrimerPack
Source§fn default() -> PrimerPack
fn default() -> PrimerPack
impl Eq for PrimerPack
Source§impl<'a> Parse<'a> for PrimerPack
impl<'a> Parse<'a> for PrimerPack
Source§impl PartialEq for PrimerPack
impl PartialEq for PrimerPack
Source§impl Serialize for PrimerPack
impl Serialize for PrimerPack
Source§type Error = Error
type Error = Error
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
serialize_into will write.