pub struct ExtFdt {
pub version: u8,
pub instance_id: u32,
}Expand description
EXT_FDT — FDT Instance Header (RFC 6726 §3.4.1, HET = 192, fixed-length).
Layout (one 32-bit word): HET(8) | V(4) | FDT Instance ID(20).
Fields§
§version: u8FLUTE version (V, 4 bits). RFC 6726 = FLUTE_VERSION (2).
instance_id: u32FDT Instance ID (20 bits) — identifies the FDT Instance in the session.
Implementations§
Source§impl ExtFdt
impl ExtFdt
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_FDT (the 24 bits after the HET byte).
Sourcepub fn to_content(&self) -> Result<[u8; 3]>
pub fn to_content(&self) -> Result<[u8; 3]>
Encode the 3 content bytes (the 24 bits after HET).
Sourcepub fn to_extension<'a>(
&self,
scratch: &'a mut [u8; 3],
) -> Result<HeaderExtension<'a>>
pub fn to_extension<'a>( &self, scratch: &'a mut [u8; 3], ) -> Result<HeaderExtension<'a>>
Build a fixed-length HeaderExtension (HET = 192) for this EXT_FDT,
writing the 3 content bytes into scratch.
Trait Implementations§
impl Copy for ExtFdt
impl Eq for ExtFdt
impl StructuralPartialEq for ExtFdt
Auto Trait Implementations§
impl Freeze for ExtFdt
impl RefUnwindSafe for ExtFdt
impl Send for ExtFdt
impl Sync for ExtFdt
impl Unpin for ExtFdt
impl UnsafeUnpin for ExtFdt
impl UnwindSafe for ExtFdt
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