pub struct PRRView<'a> { /* private fields */ }Expand description
Zero-copy view over the field data of a PRR 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 PRR with Self::to_owned.
Implementations§
Source§impl<'a> PRRView<'a>
impl<'a> PRRView<'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_flg(&self) -> B1
pub fn num_test(&self) -> U2
pub fn hard_bin(&self) -> U2
pub fn soft_bin(&self) -> U2
pub fn x_coord(&self) -> I2
pub fn y_coord(&self) -> I2
pub fn test_t(&self) -> U4
pub fn part_id(&self) -> CnRef<'a>
pub fn part_txt(&self) -> CnRef<'a>
pub fn part_fix(&self) -> BnRef<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PRRView<'a>
impl<'a> RefUnwindSafe for PRRView<'a>
impl<'a> Send for PRRView<'a>
impl<'a> Sync for PRRView<'a>
impl<'a> Unpin for PRRView<'a>
impl<'a> UnsafeUnpin for PRRView<'a>
impl<'a> UnwindSafe for PRRView<'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