[][src]Enum mp4ameta::ContentT

pub enum ContentT {
    Atoms(Vec<AtomT>),
    RawData(DataT),
    TypedData,
    Empty,
}

A template representing the different types of content an atom template might have.

Variants

Atoms(Vec<AtomT>)

A

RawData(DataT)

A value containing a data template specifying the datatype.

TypedData

A template representing typed data that is defined by a Table 3-5 Well-known data types code prior to the data parsed.

Empty

Empty content.

Implementations

impl ContentT[src]

pub fn atoms_t() -> Self[src]

Creates a new empty content template of type Self::Atoms.

pub fn atom_t(atom: AtomT) -> Self[src]

Creates a new content template of type Self::Atoms containing the atom template.

pub fn data_atom_t() -> Self[src]

Creates a new content template of type Self::Atoms containing a data atom template.

pub fn atom_t_with(ident: Ident, offset: usize, content: Self) -> Self[src]

Creates a new content template of type Self::Atoms containing a new atom template with the identifier, offset and content.

pub fn add_atom_t(self, atom: AtomT) -> Self[src]

Adds the atom template to the list of children atom templates if self is of type Self::Atoms.

pub fn add_data_atom_t(self) -> Self[src]

Adds a data atom template to the list of children if self is of type Self::Atoms.

pub fn add_atom_t_with(self, ident: Ident, offset: usize, content: Self) -> Self[src]

Adds a new atom template with the provided identifier, offset and content template to the list of children, if self is of type Self::Atoms.

pub fn parse(
    &self,
    reader: &mut impl Read + Seek,
    length: usize
) -> Result<Content>
[src]

Attempts to parse corresponding content from the reader.

Trait Implementations

impl Clone for ContentT[src]

impl Debug for ContentT[src]

impl PartialEq<ContentT> for ContentT[src]

impl StructuralPartialEq for ContentT[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.