pub struct TSRView<'a> { /* private fields */ }Expand description
Zero-copy view over the field data of a TSR 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 TSR with Self::to_owned.
Implementations§
Source§impl<'a> TSRView<'a>
impl<'a> TSRView<'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 test_typ(&self) -> C1
pub fn test_num(&self) -> U4
pub fn exec_cnt(&self) -> U4
pub fn fail_cnt(&self) -> U4
pub fn alrm_cnt(&self) -> U4
pub fn test_nam(&self) -> CnRef<'a>
pub fn seq_name(&self) -> CnRef<'a>
pub fn test_lbl(&self) -> CnRef<'a>
pub fn opt_flag(&self) -> B1
pub fn test_tim(&self) -> R4
pub fn test_min(&self) -> R4
pub fn test_max(&self) -> R4
pub fn tst_sums(&self) -> R4
pub fn tst_sqrs(&self) -> R4
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TSRView<'a>
impl<'a> RefUnwindSafe for TSRView<'a>
impl<'a> Send for TSRView<'a>
impl<'a> Sync for TSRView<'a>
impl<'a> Unpin for TSRView<'a>
impl<'a> UnsafeUnpin for TSRView<'a>
impl<'a> UnwindSafe for TSRView<'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