pub struct SectionSetCollector { /* private fields */ }Expand description
Generic collector for long-form section_number/last_section_number
sequences.
Implementations§
Source§impl SectionSetCollector
impl SectionSetCollector
Sourcepub fn push_section(
&mut self,
bytes: impl AsRef<[u8]>,
) -> CollectResult<Option<CompleteSectionSet>>
pub fn push_section( &mut self, bytes: impl AsRef<[u8]>, ) -> CollectResult<Option<CompleteSectionSet>>
Push one complete section. Returns Some only when the logical section
set has become complete for the first time at this version.
§Errors
Returns a CollectError if the bytes are not a valid long-form
section or if the section set becomes internally inconsistent. Treat the
error as applying to this section only unless your application wants
strict stream-fail behavior.
Sourcepub fn push_section_with_pid(
&mut self,
pid: Option<u16>,
bytes: impl AsRef<[u8]>,
) -> CollectResult<Option<CompleteSectionSet>>
pub fn push_section_with_pid( &mut self, pid: Option<u16>, bytes: impl AsRef<[u8]>, ) -> CollectResult<Option<CompleteSectionSet>>
Push one complete section with PID context.
The PID is folded into the section-set key so tables with identical table id/extension on different PIDs do not collide.
Trait Implementations§
Source§impl Debug for SectionSetCollector
impl Debug for SectionSetCollector
Source§impl Default for SectionSetCollector
impl Default for SectionSetCollector
Source§fn default() -> SectionSetCollector
fn default() -> SectionSetCollector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SectionSetCollector
impl RefUnwindSafe for SectionSetCollector
impl Send for SectionSetCollector
impl Sync for SectionSetCollector
impl Unpin for SectionSetCollector
impl UnsafeUnpin for SectionSetCollector
impl UnwindSafe for SectionSetCollector
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