Skip to main content

STRView

Struct STRView 

Source
pub struct STRView<'a> { /* private fields */ }
Expand description

Zero-copy view over the field data of a STR 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 STR with Self::to_owned.

Implementations§

Source§

impl<'a> STRView<'a>

Source

pub fn new(raw: &'a [u8], order: &ByteOrder) -> Self

Scan the given raw data and store byte offset of each field.

Source

pub fn to_owned(&self) -> STR

Re-parse the borrowed payload into the owned record.

Source

pub fn cont_flg(&self) -> B1

Source

pub fn test_num(&self) -> U4

Source

pub fn head_num(&self) -> U1

Source

pub fn site_num(&self) -> U1

Source

pub fn psr_ref(&self) -> U2

Source

pub fn test_flg(&self) -> B1

Source

pub fn log_typ(&self) -> CnRef<'a>

Source

pub fn test_txt(&self) -> CnRef<'a>

Source

pub fn alarm_id(&self) -> CnRef<'a>

Source

pub fn prog_txt(&self) -> CnRef<'a>

Source

pub fn rslt_txt(&self) -> CnRef<'a>

Source

pub fn z_val(&self) -> U1

Source

pub fn fmu_flg(&self) -> B1

Source

pub fn mask_map(&self) -> DnRef<'a>

Source

pub fn fal_map(&self) -> DnRef<'a>

Source

pub fn cyc_cnt_t(&self) -> U8

Source

pub fn totf_cnt(&self) -> U4

Source

pub fn totl_cnt(&self) -> U4

Source

pub fn cyc_base(&self) -> U8

Source

pub fn bit_base(&self) -> U4

Source

pub fn cond_cnt(&self) -> U2

Source

pub fn lim_cnt(&self) -> U2

Source

pub fn cyc_size(&self) -> U1

Source

pub fn pmr_size(&self) -> U1

Source

pub fn chn_size(&self) -> U1

Source

pub fn pat_size(&self) -> U1

Source

pub fn bit_size(&self) -> U1

Source

pub fn u1_size(&self) -> U1

Source

pub fn u2_size(&self) -> U1

Source

pub fn u3_size(&self) -> U1

Source

pub fn utx_size(&self) -> U1

Source

pub fn cap_bgn(&self) -> U2

Source

pub fn lim_indx(&self) -> KxU2

Source

pub fn lim_spec(&self) -> KxU4

Source

pub fn cond_lst(&self) -> KxCnRef<'a>

Source

pub fn cyc_cnt(&self) -> U2

Source

pub fn cyc_ofst(&self) -> KxUf

Source

pub fn pmr_cnt(&self) -> U2

Source

pub fn pmr_indx(&self) -> KxUf

Source

pub fn chn_cnt(&self) -> U2

Source

pub fn chn_num(&self) -> KxUf

Source

pub fn exp_cnt(&self) -> U2

Source

pub fn exp_data(&self) -> KxU1

Source

pub fn cap_cnt(&self) -> U2

Source

pub fn cap_data(&self) -> KxU1

Source

pub fn new_cnt(&self) -> U2

Source

pub fn new_data(&self) -> KxU1

Source

pub fn pat_cnt(&self) -> U2

Source

pub fn pat_num(&self) -> KxUf

Source

pub fn bpos_cnt(&self) -> U2

Source

pub fn bit_pos(&self) -> KxUf

Source

pub fn usr1_cnt(&self) -> U2

Source

pub fn usr1(&self) -> KxUf

Source

pub fn usr2_cnt(&self) -> U2

Source

pub fn usr2(&self) -> KxUf

Source

pub fn usr3_cnt(&self) -> U2

Source

pub fn usr3(&self) -> KxUf

Source

pub fn txt_cnt(&self) -> U2

Source

pub fn user_txt(&self) -> KxCfRef<'a>

Trait Implementations§

Source§

impl<'a> Clone for STRView<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for STRView<'a>

Source§

impl<'a> Debug for STRView<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for STRView<'a>

§

impl<'a> RefUnwindSafe for STRView<'a>

§

impl<'a> Send for STRView<'a>

§

impl<'a> Sync for STRView<'a>

§

impl<'a> Unpin for STRView<'a>

§

impl<'a> UnsafeUnpin for STRView<'a>

§

impl<'a> UnwindSafe for STRView<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.