#[non_exhaustive]pub enum AdaptationFieldControl {
Reserved,
PayloadOnly,
AdaptationOnly,
AdaptationAndPayload,
}Expand description
2-bit adaptation_field_control field — ITU-T H.222.0 (08/2023) Table 2-5.
Decoders shall discard packets with value 00 (Reserved). Null packets use 01
(PayloadOnly). The two flags has_adaptation/has_payload on TsHeader carry
the decoded booleans; this enum provides the typed composite view.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Reserved
00 — reserved for future use; decoders shall discard (H.222.0 Table 2-5).
PayloadOnly
01 — no adaptation_field, payload only (H.222.0 Table 2-5).
AdaptationOnly
10 — adaptation_field only, no payload (H.222.0 Table 2-5).
AdaptationAndPayload
11 — adaptation_field followed by payload (H.222.0 Table 2-5).
Implementations§
Source§impl AdaptationFieldControl
impl AdaptationFieldControl
Sourcepub fn from_flags(has_adaptation: bool, has_payload: bool) -> Self
pub fn from_flags(has_adaptation: bool, has_payload: bool) -> Self
Derive from the two decoded boolean flags stored on TsHeader.
Sourcepub fn to_flags(self) -> (bool, bool)
pub fn to_flags(self) -> (bool, bool)
The (has_adaptation, has_payload) flag pair stored on TsHeader;
the inverse of from_flags.
Trait Implementations§
Source§impl Clone for AdaptationFieldControl
impl Clone for AdaptationFieldControl
impl Copy for AdaptationFieldControl
Source§impl Debug for AdaptationFieldControl
impl Debug for AdaptationFieldControl
Source§impl Display for AdaptationFieldControl
impl Display for AdaptationFieldControl
impl Eq for AdaptationFieldControl
Source§impl PartialEq for AdaptationFieldControl
impl PartialEq for AdaptationFieldControl
Source§impl Serialize for AdaptationFieldControl
Available on crate feature serde only.
impl Serialize for AdaptationFieldControl
Available on crate feature
serde only.impl StructuralPartialEq for AdaptationFieldControl
Auto Trait Implementations§
impl Forget for AdaptationFieldControl
impl Freeze for AdaptationFieldControl
impl RefUnwindSafe for AdaptationFieldControl
impl Send for AdaptationFieldControl
impl Sync for AdaptationFieldControl
impl Unpin for AdaptationFieldControl
impl UnsafeUnpin for AdaptationFieldControl
impl UnwindSafe for AdaptationFieldControl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more