pub struct DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: SectionSyntaxPayloadParser,{ /* private fields */ }Expand description
A wrapper around some other implementation of SectionSyntaxPayloadParser that passes-through
section data, unless the TableSyntaxHeader indicates a version_number which is the same as
the last data that was passed though.
This avoids the underlying code needing to re-parse duplicate copies of the section, which are usually inserted periodically in the Transport Stream.
Implementations§
Source§impl<SSPP> DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: SectionSyntaxPayloadParser,
impl<SSPP> DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: SectionSyntaxPayloadParser,
Sourcepub fn new(inner: SSPP) -> DedupSectionSyntaxPayloadParser<SSPP>
pub fn new(inner: SSPP) -> DedupSectionSyntaxPayloadParser<SSPP>
Wraps the given SectionSyntaxPayloadParser in a new DedupSectionSyntaxPayloadParser
instance.
Trait Implementations§
Source§impl<SSPP> SectionSyntaxPayloadParser for DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: SectionSyntaxPayloadParser,
impl<SSPP> SectionSyntaxPayloadParser for DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: SectionSyntaxPayloadParser,
Source§type Context = <SSPP as SectionSyntaxPayloadParser>::Context
type Context = <SSPP as SectionSyntaxPayloadParser>::Context
The type of the context object passed to all methods
Source§fn start_syntax_section<'a>(
&mut self,
ctx: &mut Self::Context,
header: &SectionCommonHeader,
table_syntax_header: &TableSyntaxHeader<'a>,
data: &'a [u8],
)
fn start_syntax_section<'a>( &mut self, ctx: &mut Self::Context, header: &SectionCommonHeader, table_syntax_header: &TableSyntaxHeader<'a>, data: &'a [u8], )
NB the
data buffer passed to will include the bytes which are represented by header
and table_syntax_header (in order that the called code can check any CRC that covers the
whole section).Source§fn continue_syntax_section(&mut self, ctx: &mut Self::Context, data: &[u8])
fn continue_syntax_section(&mut self, ctx: &mut Self::Context, data: &[u8])
may be called to pass the implementation additional slices of section data, if the
complete section was not already passed.
Auto Trait Implementations§
impl<SSPP> Freeze for DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: Freeze,
impl<SSPP> RefUnwindSafe for DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: RefUnwindSafe,
impl<SSPP> Send for DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: Send,
impl<SSPP> Sync for DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: Sync,
impl<SSPP> Unpin for DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: Unpin,
impl<SSPP> UnwindSafe for DedupSectionSyntaxPayloadParser<SSPP>where
SSPP: UnwindSafe,
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