pub struct SectionCommonHeader {
    pub table_id: u8,
    pub section_syntax_indicator: bool,
    pub private_indicator: bool,
    pub section_length: usize,
}
Expand description

Header common to all PSI sections, whether they then use ‘section syntax’ or ‘compact syntax’.

Fields§

§table_id: u8

The type of table of which this is a section

§section_syntax_indicator: bool

true for ’section syntax, false` for ‘compact syntax’.

§private_indicator: bool

indicates that the data in the table is for private use not defined in ISO/IEC 13818-1 (section types implemented in this crate are to be used with data that has e in this field, but other crates might be written to support private table sections).

§section_length: usize

the number of bytes in the section data immediately following this field (which may be more bytes than will fit into a single TS packet).

Implementations§

source§

impl SectionCommonHeader

source

pub const SIZE: usize = 3usize

The fixed size of the CommonSectionHeader data in the Transport Stream; 3 bytes.

source

pub fn new(buf: &[u8]) -> SectionCommonHeader

Parses the data in the given slice into a new SectionCommonHeader.

Panics if the slice is not exactly 3 bytes long.

Trait Implementations§

source§

impl Debug for SectionCommonHeader

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.