RegistrationDescriptor

Struct RegistrationDescriptor 

Source
pub struct RegistrationDescriptor<'buf> { /* private fields */ }
Expand description

Indicates which kind of syntax any ‘private data’ within the transport stream will be following

Implementations§

Source§

impl<'buf> RegistrationDescriptor<'buf>

Source

pub const TAG: u8 = 5u8

The descriptor tag value which identifies the descriptor as a RegistrationDescriptor.

Source

pub fn new( tag: u8, buf: &'buf [u8], ) -> Result<RegistrationDescriptor<'buf>, DescriptorError>

Construct a RegistrationDescriptor instance that will parse the data from the given slice.

Source

pub fn format_identifier(&self) -> FormatIdentifier

Format identifier value assigned by a Registration Authority.

Note that the FormatIdentifier type defines numerous constants for identifiers registered with the SMPTE RA, which you can use in tests like so:

use mpeg2ts_reader::smptera::FormatIdentifier;
if descriptor.format_identifier() == FormatIdentifier::CUEI {
    // perform some interesting action
}
Source

pub fn is_format(&self, id: FormatIdentifier) -> bool

Returns true if the given identifier is equal to the value returned by format_identifier()

Source

pub fn additional_identification_info(&self) -> &[u8]

borrows a slice of additional_identification_info bytes, whose meaning is defined by the identifier returned by format_identifier().

Trait Implementations§

Source§

impl<'buf> Debug for RegistrationDescriptor<'buf>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'buf> Freeze for RegistrationDescriptor<'buf>

§

impl<'buf> RefUnwindSafe for RegistrationDescriptor<'buf>

§

impl<'buf> Send for RegistrationDescriptor<'buf>

§

impl<'buf> Sync for RegistrationDescriptor<'buf>

§

impl<'buf> Unpin for RegistrationDescriptor<'buf>

§

impl<'buf> UnwindSafe for RegistrationDescriptor<'buf>

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

Source§

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

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.