pub struct SectionSyntaxSectionProcessor<SP>where
SP: SectionSyntaxPayloadParser,{ /* private fields */ }Expand description
An implementation of SectionProcessor to be used for sections that implement ‘section syntax’
(rather than ‘compact syntax’).
Parses the TableSyntaxHeader at the front of the section data, and then delegates handling
to the SectionSyntaxPayloadParser instance given at construction time.
Implementations§
Source§impl<SP> SectionSyntaxSectionProcessor<SP>where
SP: SectionSyntaxPayloadParser,
impl<SP> SectionSyntaxSectionProcessor<SP>where
SP: SectionSyntaxPayloadParser,
Sourcepub fn new(payload_parser: SP) -> SectionSyntaxSectionProcessor<SP>
pub fn new(payload_parser: SP) -> SectionSyntaxSectionProcessor<SP>
Wraps the given SectionSyntaxPayloadParser instance in a new
SectionSyntaxSectionProcessor.
Trait Implementations§
Source§impl<SP> SectionProcessor for SectionSyntaxSectionProcessor<SP>where
SP: SectionSyntaxPayloadParser,
impl<SP> SectionProcessor for SectionSyntaxSectionProcessor<SP>where
SP: SectionSyntaxPayloadParser,
Source§type Context = <SP as SectionSyntaxPayloadParser>::Context
type Context = <SP as SectionSyntaxPayloadParser>::Context
The type of the context object that the caller will pass through to the methods of this
trait
Source§fn start_section(
&mut self,
ctx: &mut Self::Context,
header: &SectionCommonHeader,
data: &[u8],
)
fn start_section( &mut self, ctx: &mut Self::Context, header: &SectionCommonHeader, data: &[u8], )
Note that the first 3 bytes of
section_data contain the header fields that have also
been supplied to this call in the header parameter. This is to allow implementers to
calculate a CRC over the whole section if required.Source§fn continue_section(&mut self, ctx: &mut Self::Context, data: &[u8])
fn continue_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<SP> Freeze for SectionSyntaxSectionProcessor<SP>where
SP: Freeze,
impl<SP> RefUnwindSafe for SectionSyntaxSectionProcessor<SP>where
SP: RefUnwindSafe,
impl<SP> Send for SectionSyntaxSectionProcessor<SP>where
SP: Send,
impl<SP> Sync for SectionSyntaxSectionProcessor<SP>where
SP: Sync,
impl<SP> Unpin for SectionSyntaxSectionProcessor<SP>where
SP: Unpin,
impl<SP> UnwindSafe for SectionSyntaxSectionProcessor<SP>where
SP: 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