Trait mpeg2ts_reader::descriptor::Descriptor[][src]

pub trait Descriptor<'buf>: Sized {
    fn from_bytes(buf: &'buf [u8]) -> Result<Self, DescriptorError>;
}

Trait allowing users of this trait to supply their own implementation of descriptor parsing.

The default implementation provided by this crate is CoreDescriptors, which will only provide support for descriptor types directly defined by ISO/IEC 13818-1. To support descriptors from other standards, an alternative implementation of this trait may be passed as a type parameter to methods such as PmtSection::descriptors().

The descriptor_enum!{} macro can be used to help create implementations of this trait.

Required methods

fn from_bytes(buf: &'buf [u8]) -> Result<Self, DescriptorError>[src]

Create an object that that can wrap and parse the type of descriptor at the start of the given slice.

Loading content...

Implementors

Loading content...