pub struct SDRView<'a> { /* private fields */ }Expand description
Zero-copy view over the field data of a SDR 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 SDR with Self::to_owned.
Implementations§
Source§impl<'a> SDRView<'a>
impl<'a> SDRView<'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_grp(&self) -> U1
pub fn site_cnt(&self) -> U1
pub fn site_num(&self) -> KxU1
pub fn hand_typ(&self) -> CnRef<'a>
pub fn hand_id(&self) -> CnRef<'a>
pub fn card_typ(&self) -> CnRef<'a>
pub fn card_id(&self) -> CnRef<'a>
pub fn load_typ(&self) -> CnRef<'a>
pub fn load_id(&self) -> CnRef<'a>
pub fn dib_typ(&self) -> CnRef<'a>
pub fn dib_id(&self) -> CnRef<'a>
pub fn cabl_typ(&self) -> CnRef<'a>
pub fn cabl_id(&self) -> CnRef<'a>
pub fn cont_typ(&self) -> CnRef<'a>
pub fn cont_id(&self) -> CnRef<'a>
pub fn lasr_typ(&self) -> CnRef<'a>
pub fn lasr_id(&self) -> CnRef<'a>
pub fn extr_typ(&self) -> CnRef<'a>
pub fn extr_id(&self) -> CnRef<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SDRView<'a>
impl<'a> RefUnwindSafe for SDRView<'a>
impl<'a> Send for SDRView<'a>
impl<'a> Sync for SDRView<'a>
impl<'a> Unpin for SDRView<'a>
impl<'a> UnsafeUnpin for SDRView<'a>
impl<'a> UnwindSafe for SDRView<'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