Skip to main content

ParsedDescriptorLoop

Struct ParsedDescriptorLoop 

Source
pub struct ParsedDescriptorLoop<'a> { /* private fields */ }
Expand description

Parsed descriptor loop retaining the raw bytes and the typed descriptor results.

Usually backed by a single section’s descriptor loop, but a table-wide loop that a spec allows to split across sections (e.g. NIT §5.2.1 / BAT §5.2.2’s network_descriptors_loop / bouquet_descriptors_loop, one per section) is built by concatenating each section’s loop internally: raw() then yields one entry per contributing section, in section order, and descriptors() is their concatenation in the same order.

Implementations§

Source§

impl<'a> ParsedDescriptorLoop<'a>

Source

pub fn raw(&self) -> &[DescriptorLoop<'a>]

Raw descriptor-loop bytes, one entry per contributing section (in section order). Almost always a single entry.

Use raw()[i].iter_with_extensions(&desc_reg, &ext_reg) to recover custom extension bodies from a Complete* view.

Source

pub fn descriptors(&self) -> &[Result<AnyDescriptor<'a>>] ⓘ

Typed descriptor parse results in wire order (concatenated across every contributing section for a multi-section loop).

Trait Implementations§

Source§

impl<'a> Debug for ParsedDescriptorLoop<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> ErasedDestructor for T
where T: 'static,

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>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.