pub struct ExtCenc {
pub algorithm: CencAlgorithm,
}Expand description
EXT_CENC — FDT Instance Content Encoding Header (RFC 6726 §3.4.3, HET = 193, fixed-length).
Layout (one 32-bit word): HET(8) | CENC(8) | Reserved(16).
Fields§
§algorithm: CencAlgorithmContent-encoding algorithm of the FDT Instance payload.
Implementations§
Source§impl ExtCenc
impl ExtCenc
Sourcepub fn parse(content: &[u8]) -> Result<Self>
pub fn parse(content: &[u8]) -> Result<Self>
Decode from the 3 content bytes of a fixed-length HeaderExtension
whose HET is HET_EXT_CENC: CENC(8) | Reserved(16).
Sourcepub fn to_content(&self) -> [u8; 3]
pub fn to_content(&self) -> [u8; 3]
Encode the 3 content bytes (CENC | Reserved=0).
Sourcepub fn to_extension<'a>(&self, scratch: &'a mut [u8; 3]) -> HeaderExtension<'a>
pub fn to_extension<'a>(&self, scratch: &'a mut [u8; 3]) -> HeaderExtension<'a>
Build a fixed-length HeaderExtension (HET = 193) for this EXT_CENC,
writing the 3 content bytes into scratch.
Trait Implementations§
impl Copy for ExtCenc
impl Eq for ExtCenc
impl StructuralPartialEq for ExtCenc
Auto Trait Implementations§
impl Freeze for ExtCenc
impl RefUnwindSafe for ExtCenc
impl Send for ExtCenc
impl Sync for ExtCenc
impl Unpin for ExtCenc
impl UnsafeUnpin for ExtCenc
impl UnwindSafe for ExtCenc
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