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>
impl<'buf> RegistrationDescriptor<'buf>
Sourcepub const TAG: u8 = 5u8
pub const TAG: u8 = 5u8
The descriptor tag value which identifies the descriptor as a RegistrationDescriptor.
Sourcepub fn new(
tag: u8,
buf: &'buf [u8],
) -> Result<RegistrationDescriptor<'buf>, DescriptorError>
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.
Sourcepub fn format_identifier(&self) -> FormatIdentifier
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
}Sourcepub fn is_format(&self, id: FormatIdentifier) -> bool
pub fn is_format(&self, id: FormatIdentifier) -> bool
Returns true if the given identifier is equal to the value returned by format_identifier()
Sourcepub fn additional_identification_info(&self) -> &[u8] ⓘ
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§
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> 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