pub struct CompactSyntaxSectionProcessor<SP>where
SP: CompactSyntaxPayloadParser,{ /* private fields */ }Expand description
An implementation of SectionProcessor to be used for sections that implement ‘compact syntax’
(rather than ‘section syntax’).
Delegates handling to the CompactSyntaxPayloadParser instance given at construction time.
Implementations§
Source§impl<SP> CompactSyntaxSectionProcessor<SP>where
SP: CompactSyntaxPayloadParser,
impl<SP> CompactSyntaxSectionProcessor<SP>where
SP: CompactSyntaxPayloadParser,
Sourcepub fn new(payload_parser: SP) -> CompactSyntaxSectionProcessor<SP>
pub fn new(payload_parser: SP) -> CompactSyntaxSectionProcessor<SP>
Wraps the given CompactSyntaxPayloadParser instance in a new
CompactSyntaxSectionProcessor.
Trait Implementations§
Source§impl<SP> SectionProcessor for CompactSyntaxSectionProcessor<SP>where
SP: CompactSyntaxPayloadParser,
impl<SP> SectionProcessor for CompactSyntaxSectionProcessor<SP>where
SP: CompactSyntaxPayloadParser,
Source§type Context = <SP as CompactSyntaxPayloadParser>::Context
type Context = <SP as CompactSyntaxPayloadParser>::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 CompactSyntaxSectionProcessor<SP>where
SP: Freeze,
impl<SP> RefUnwindSafe for CompactSyntaxSectionProcessor<SP>where
SP: RefUnwindSafe,
impl<SP> Send for CompactSyntaxSectionProcessor<SP>where
SP: Send,
impl<SP> Sync for CompactSyntaxSectionProcessor<SP>where
SP: Sync,
impl<SP> Unpin for CompactSyntaxSectionProcessor<SP>where
SP: Unpin,
impl<SP> UnwindSafe for CompactSyntaxSectionProcessor<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