pub struct CDRView<'a> { /* private fields */ }Expand description
Zero-copy view over the field data of a CDR 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 CDR with Self::to_owned.
Implementations§
Source§impl<'a> CDRView<'a>
impl<'a> CDRView<'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 cdr_indx(&self) -> U2
pub fn chn_nam(&self) -> CnRef<'a>
pub fn chn_len(&self) -> U4
pub fn sin_pin(&self) -> U2
pub fn sout_pin(&self) -> U2
pub fn mstr_cnt(&self) -> U1
pub fn m_clks(&self) -> KxU2
pub fn slav_cnt(&self) -> U1
pub fn s_clks(&self) -> KxU2
pub fn inv_val(&self) -> U1
pub fn lst_cnt(&self) -> U2
pub fn cell_lst(&self) -> KxSnRef<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CDRView<'a>
impl<'a> RefUnwindSafe for CDRView<'a>
impl<'a> Send for CDRView<'a>
impl<'a> Sync for CDRView<'a>
impl<'a> Unpin for CDRView<'a>
impl<'a> UnsafeUnpin for CDRView<'a>
impl<'a> UnwindSafe for CDRView<'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