Struct mpeg2ts_reader::packet::AdaptationField[][src]

pub struct AdaptationField<'buf> { /* fields omitted */ }

A collection of fields that may optionally appear within the header of a transport stream Packet.

As returned by Packet::adaptation_field()

Implementations

impl<'buf> AdaptationField<'buf>[src]

pub fn new(buf: &'buf [u8]) -> AdaptationField<'buf>[src]

Create a new structure to parse the adaptation field data held within the given slice.

Panics if the slice is empty.

pub fn discontinuity_indicator(&self) -> bool[src]

Get the value of the discontinuity_indicator field which might have been written into the transport stream by some ‘upstream’ processor on discovering that there was a break in the data.

pub fn random_access_indicator(&self) -> bool[src]

Get the value of the random_access_indicator field.

pub fn elementary_stream_priority_indicator(&self) -> u8[src]

Get the value of the elementary_stream_priority_indicator field.

pub fn pcr(&self) -> Result<ClockRef, AdaptationFieldError>[src]

Get the Program Clock Reference field, or AdaptationFieldError::FieldNotPresent if absent

pub fn opcr(&self) -> Result<ClockRef, AdaptationFieldError>[src]

Returns the ‘Original Program Clock Reference’ value, or AdaptationFieldError::FieldNotPresent if absent

pub fn splice_countdown(&self) -> Result<u8, AdaptationFieldError>[src]

Get the value of the splice_countdown field, or AdaptationFieldError::FieldNotPresent if absent

pub fn transport_private_data(&self) -> Result<&[u8], AdaptationFieldError>[src]

Borrow a slice of the underlying buffer containing private data, or AdaptationFieldError::FieldNotPresent if absent

pub fn adaptation_field_extension(
    &self
) -> Result<AdaptationFieldExtension<'buf>, AdaptationFieldError>
[src]

Returns extended adaptation fields, or AdaptationFieldError::FieldNotPresent if absent

Trait Implementations

impl<'buf> Debug for AdaptationField<'buf>[src]

Auto Trait Implementations

impl<'buf> RefUnwindSafe for AdaptationField<'buf>

impl<'buf> Send for AdaptationField<'buf>

impl<'buf> Sync for AdaptationField<'buf>

impl<'buf> Unpin for AdaptationField<'buf>

impl<'buf> UnwindSafe for AdaptationField<'buf>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.