pub struct NMRView<'a> { /* private fields */ }Expand description
Zero-copy view over the field data of a NMR 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 NMR with Self::to_owned.
Implementations§
Source§impl<'a> NMRView<'a>
impl<'a> NMRView<'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 cont_flg(&self) -> B1
pub fn totm_cnt(&self) -> U2
pub fn locm_cnt(&self) -> U2
pub fn pmr_indx(&self) -> KxU2
pub fn atpg_nam(&self) -> KxCnRef<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for NMRView<'a>
impl<'a> RefUnwindSafe for NMRView<'a>
impl<'a> Send for NMRView<'a>
impl<'a> Sync for NMRView<'a>
impl<'a> Unpin for NMRView<'a>
impl<'a> UnsafeUnpin for NMRView<'a>
impl<'a> UnwindSafe for NMRView<'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