Struct cdp_types::CDPWriter

source ·
pub struct CDPWriter { /* private fields */ }
Expand description

A struct for writing cc_data packets

Implementations§

source§

impl CDPWriter

source

pub fn new(frame_rate: Framerate) -> Self

source

pub fn push_packet(&mut self, packet: DTVCCPacket)

Push a cea708_types::DTVCCPacket for writing

source

pub fn push_cea608(&mut self, cea608: Cea608)

Push a cea708_types::Cea608 byte pair for writing

source

pub fn set_time_code(&mut self, time_code: Option<TimeCode>)

source

pub fn set_sequence_count(&mut self, sequence: u16)

Set the next packet’s sequence count to a specific value

source

pub fn flush(&mut self)

Clear all stored data

source

pub fn write<W: Write>(&mut self, w: &mut W) -> Result<(), Error>

Write the next CDP packet taking the next relevant CEA-608 byte pairs and cea708_types::DTVCCPackets.

Trait Implementations§

source§

impl Debug for CDPWriter

source§

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

Formats the value using the given formatter. Read more

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.