pub struct SectionPacketConsumer<P>{ /* private fields */ }
Expand description

A type for locating the headers of PSI sections, which may be split across multiple TS packets, and passing each piece to the given SectionProcessor as it is discovered.

Implementations§

source§

impl<P, Ctx> SectionPacketConsumer<P>
where P: SectionProcessor<Context = Ctx>,

source

pub fn new(parser: P) -> SectionPacketConsumer<P>

Construct a new instance that will delegate processing of section data found in TS packet payloads to the given SectionProcessor instance.

source

pub fn consume(&mut self, ctx: &mut Ctx, pk: &Packet<'_>)

process the payload of the given TS packet, passing each piece of section data discovered to the SectionProcessor instance given at time of construction.

Auto Trait Implementations§

§

impl<P> RefUnwindSafe for SectionPacketConsumer<P>
where P: RefUnwindSafe,

§

impl<P> Send for SectionPacketConsumer<P>
where P: Send,

§

impl<P> Sync for SectionPacketConsumer<P>
where P: Sync,

§

impl<P> Unpin for SectionPacketConsumer<P>
where P: Unpin,

§

impl<P> UnwindSafe for SectionPacketConsumer<P>
where P: UnwindSafe,

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.