pub struct WCRView<'a> { /* private fields */ }Expand description
Zero-copy view over the field data of a WCR 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 WCR with Self::to_owned.
Implementations§
Source§impl<'a> WCRView<'a>
impl<'a> WCRView<'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 wafr_siz(&self) -> R4
pub fn die_ht(&self) -> R4
pub fn die_wid(&self) -> R4
pub fn wf_units(&self) -> U1
pub fn wf_flat(&self) -> C1
pub fn center_x(&self) -> I2
pub fn center_y(&self) -> I2
pub fn pos_x(&self) -> C1
pub fn pos_y(&self) -> C1
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WCRView<'a>
impl<'a> RefUnwindSafe for WCRView<'a>
impl<'a> Send for WCRView<'a>
impl<'a> Sync for WCRView<'a>
impl<'a> Unpin for WCRView<'a>
impl<'a> UnsafeUnpin for WCRView<'a>
impl<'a> UnwindSafe for WCRView<'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