dvb_si/descriptors/
mod.rs1pub mod aac;
14pub mod ac3;
15pub mod adaptation_field_data;
16pub mod ancillary_data;
17pub mod announcement_support;
18pub mod application_signalling;
19pub mod bouquet_name;
20pub mod ca;
21pub mod ca_identifier;
22pub mod cable_delivery_system;
23pub mod cell_frequency_link;
24pub mod cell_list;
25pub mod component;
26pub mod content;
27pub mod content_identifier;
28pub mod country_availability;
29pub mod data_broadcast;
30pub mod data_broadcast_id;
31pub mod data_stream_alignment;
32pub mod default_authority;
33pub mod dsng;
34pub mod dts;
35pub mod ecm_repetition_rate;
36pub mod enhanced_ac3;
37pub mod extended_event;
38pub mod extension;
39pub mod frequency_list;
40pub mod fta_content_management;
41pub mod iso_639_language;
42pub mod linkage;
43pub mod local_time_offset;
44pub mod logical_channel;
45pub mod mosaic;
46pub mod multilingual_bouquet_name;
47pub mod multilingual_component;
48pub mod multilingual_network_name;
49pub mod multilingual_service_name;
50pub mod network_name;
51pub mod nvod_reference;
52pub mod parental_rating;
53pub mod partial_transport_stream;
54pub mod pdc;
55pub mod private_data_indicator;
56pub mod private_data_specifier;
57pub mod registration;
58pub mod related_content;
59pub mod s2_satellite_delivery_system;
60pub mod satellite_delivery_system;
61pub mod scrambling;
62pub mod service;
63pub mod service_availability;
64pub mod service_identifier;
65pub mod service_list;
66pub mod service_move;
67pub mod short_event;
68pub mod short_smoothing_buffer;
69pub mod stream_identifier;
70pub mod stuffing;
71pub mod subtitling;
72pub mod telephone;
73pub mod teletext;
74pub mod terrestrial_delivery_system;
75pub mod time_shifted_event;
76pub mod time_shifted_service;
77pub mod time_slice_fec_identifier;
78pub mod transport_stream;
79pub mod tva_id;
80pub mod vbi_data;
81pub mod vbi_teletext;
82pub mod xait_location;
83
84pub use ca::CaDescriptor;
85pub use data_stream_alignment::DataStreamAlignmentDescriptor;
86pub use private_data_indicator::PrivateDataIndicatorDescriptor;
87pub use registration::RegistrationDescriptor;
88
89#[derive(Debug, Clone, PartialEq, Eq)]
91#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
92#[non_exhaustive]
93pub enum Descriptor<'a> {
94 Ca(CaDescriptor<'a>),
96 DataStreamAlignment(DataStreamAlignmentDescriptor),
98 PrivateDataIndicator(PrivateDataIndicatorDescriptor),
100 Registration(RegistrationDescriptor<'a>),
102 Unknown {
104 tag: u8,
106 #[cfg_attr(feature = "serde", serde(borrow))]
108 bytes: &'a [u8],
109 },
110}
111
112impl<'a> Descriptor<'a> {
113 #[must_use]
115 pub const fn tag(&self) -> u8 {
116 match self {
117 Self::Ca(_) => ca::TAG,
118 Self::DataStreamAlignment(_) => data_stream_alignment::TAG,
119 Self::PrivateDataIndicator(_) => private_data_indicator::TAG,
120 Self::Registration(_) => registration::TAG,
121 Self::Unknown { tag, .. } => *tag,
122 }
123 }
124}