pub struct MPRView<'a> { /* private fields */ }Expand description
Zero-copy view over the field data of a MPR 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 MPR with Self::to_owned.
Implementations§
Source§impl<'a> MPRView<'a>
impl<'a> MPRView<'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 test_num(&self) -> U4
pub fn head_num(&self) -> U1
pub fn site_num(&self) -> U1
pub fn test_flg(&self) -> B1
pub fn parm_flg(&self) -> B1
pub fn rtn_icnt(&self) -> U2
pub fn rslt_cnt(&self) -> U2
pub fn rtn_stat(&self) -> KxN1
pub fn rtn_rslt(&self) -> KxR4
pub fn test_txt(&self) -> CnRef<'a>
pub fn alarm_id(&self) -> CnRef<'a>
pub fn opt_flag(&self) -> Option<B1>
pub fn res_scal(&self) -> Option<I1>
pub fn llm_scal(&self) -> Option<I1>
pub fn hlm_scal(&self) -> Option<I1>
pub fn lo_limit(&self) -> Option<R4>
pub fn hi_limit(&self) -> Option<R4>
pub fn start_in(&self) -> Option<R4>
pub fn incr_in(&self) -> Option<R4>
pub fn rtn_indx(&self) -> Option<KxU2>
pub fn units(&self) -> Option<CnRef<'a>>
pub fn units_in(&self) -> Option<CnRef<'a>>
pub fn c_resfmt(&self) -> Option<CnRef<'a>>
pub fn c_llmfmt(&self) -> Option<CnRef<'a>>
pub fn c_hlmfmt(&self) -> Option<CnRef<'a>>
pub fn lo_spec(&self) -> Option<R4>
pub fn hi_spec(&self) -> Option<R4>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MPRView<'a>
impl<'a> RefUnwindSafe for MPRView<'a>
impl<'a> Send for MPRView<'a>
impl<'a> Sync for MPRView<'a>
impl<'a> Unpin for MPRView<'a>
impl<'a> UnsafeUnpin for MPRView<'a>
impl<'a> UnwindSafe for MPRView<'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