Skip to main content

WssDataField

Struct WssDataField 

Source
pub struct WssDataField {
    pub header: LineHeader,
    pub wss_data_block: u16,
}
Expand description

WSS data field — ETSI EN 301 775 §4.7.1, Table 8 (data_unit_id 0xC4).

Byte layout (24 bits): byte0 = shared header, then 14 wss_data_block bits followed by a 2-bit reserved_future_use 11 tail. So byte1 holds wss bits [13:6] and byte2 holds wss bits [5:0] then the 2-bit RFU tail.

Fields§

§header: LineHeader

Shared first-byte header (§4.7.1: field_parity 1, line_offset 23).

§wss_data_block: u16

14-bit wss_data_block (§4.7; EN 300 294 — value in the low 14 bits).

Implementations§

Source§

impl WssDataField

Source

pub fn serialized_len(&self) -> usize

Bytes this data field occupies (the data_unit_length).

Source

pub fn parse(data: &[u8]) -> Result<Self>

Parse exactly one WSS data field from data. The trailing 2-bit RFU is not validated (decoders ignore RFU).

Source

pub fn serialize_into(&self, out: &mut [u8]) -> Result<usize>

Serialize into out, returning the number of bytes written. The 14-bit wss_data_block is masked and a 11 RFU tail is emitted.

Trait Implementations§

Source§

impl Clone for WssDataField

Source§

fn clone(&self) -> WssDataField

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 Copy for WssDataField

Source§

impl Debug for WssDataField

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for WssDataField

Source§

impl PartialEq for WssDataField

Source§

fn eq(&self, other: &WssDataField) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for WssDataField

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for WssDataField

Auto Trait Implementations§

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.