pub struct PCRView<'a> { /* private fields */ }Expand description
Zero-copy view over the field data of a PCR record.
Borrows the raw bytes and reads fields on demand via getters. Create one with Self::new or via [StdfRecordView::read_from_bytes]; convert back to an owned PCR with Self::to_owned.
Implementations§
Source§impl<'a> PCRView<'a>
impl<'a> PCRView<'a>
Sourcepub fn new(raw: &'a [u8], order: &ByteOrder) -> Self
pub fn new(raw: &'a [u8], order: &ByteOrder) -> Self
Scan the given raw data and store byte offset of each field.
pub fn head_num(&self) -> U1
pub fn site_num(&self) -> U1
pub fn part_cnt(&self) -> U4
pub fn rtst_cnt(&self) -> U4
pub fn abrt_cnt(&self) -> U4
pub fn good_cnt(&self) -> U4
pub fn func_cnt(&self) -> U4
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PCRView<'a>
impl<'a> RefUnwindSafe for PCRView<'a>
impl<'a> Send for PCRView<'a>
impl<'a> Sync for PCRView<'a>
impl<'a> Unpin for PCRView<'a>
impl<'a> UnsafeUnpin for PCRView<'a>
impl<'a> UnwindSafe for PCRView<'a>
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