pub struct TeletextDataField {
pub header: LineHeader,
pub framing_code: u8,
pub txt_data_block: [u8; 42],
}Expand description
EBU / Inverted Teletext data field — ETSI EN 301 775 §4.5.1, Table 4
(data_unit_id 0x02, 0x03, 0xC0).
The txt_data_block (42 bytes) is the EN 300 706 magazine_and_packet_address
and data_block following the clock-run-in/framing-code; EN 300 706 decoding
is out of scope, so it is held opaquely.
Fields§
§header: LineHeaderShared first-byte header: reserved_future_use 11 | field_parity |
line_offset.
framing_code: u88-bit framing_code (0b11100100 EBU / 0b00011011 Inverted, §4.5.2).
txt_data_block: [u8; 42]42-byte txt_data_block (336 bits, §4.5; EN 300 706 — opaque here).
Implementations§
Source§impl TeletextDataField
impl TeletextDataField
Sourcepub fn serialized_len(&self) -> usize
pub fn serialized_len(&self) -> usize
Bytes this data field occupies (the data_unit_length).
Sourcepub fn parse(data: &[u8]) -> Result<Self>
pub fn parse(data: &[u8]) -> Result<Self>
Parse exactly one Teletext data field from data (data must be the
data-unit body of data_unit_length bytes).
Sourcepub fn serialize_into(&self, out: &mut [u8]) -> Result<usize>
pub fn serialize_into(&self, out: &mut [u8]) -> Result<usize>
Serialize into out, returning the number of bytes written.
Trait Implementations§
Source§impl Clone for TeletextDataField
impl Clone for TeletextDataField
Source§fn clone(&self) -> TeletextDataField
fn clone(&self) -> TeletextDataField
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TeletextDataField
Source§impl Debug for TeletextDataField
impl Debug for TeletextDataField
impl Eq for TeletextDataField
Source§impl PartialEq for TeletextDataField
impl PartialEq for TeletextDataField
Source§impl Serialize for TeletextDataField
Available on crate feature serde only.
impl Serialize for TeletextDataField
Available on crate feature
serde only.impl StructuralPartialEq for TeletextDataField
Auto Trait Implementations§
impl Freeze for TeletextDataField
impl RefUnwindSafe for TeletextDataField
impl Send for TeletextDataField
impl Sync for TeletextDataField
impl Unpin for TeletextDataField
impl UnsafeUnpin for TeletextDataField
impl UnwindSafe for TeletextDataField
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