[][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 value containing a list of children atom templates.

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 const 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 iter(&self) -> Iter<'_, AtomT>[src]

Returns an iterator over the children atoms.

pub fn iter_mut(&mut self) -> IterMut<'_, AtomT>[src]

Returns a mutable iterator over the children atoms.

pub fn child(&self, ident: Ident) -> Option<&AtomT>[src]

Returns a reference to the first children atom matching the identifier, if present.

pub fn first_child(&self) -> Option<&AtomT>[src]

Return a reference to the first children atom, if present.

pub fn child_mut(&mut self, ident: Ident) -> Option<&mut AtomT>[src]

Returns a mutable reference to the first children atom matching the identfier, if present.

pub fn first_child_mut(&mut self) -> Option<&mut AtomT>[src]

Returns a mutable reference to the first children atom, if present.

pub fn take_child(self, ident: Ident) -> Option<AtomT>[src]

Consumes self and returns the first children atom matching the identfier, if present.

pub fn take_first_child(self) -> Option<AtomT>[src]

Consumes self and returns the first children atom, if present.

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 Default for ContentT[src]

impl Eq for ContentT[src]

impl IntoIterator for ContentT[src]

type Item = AtomT

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

impl PartialEq<ContentT> for ContentT[src]

impl StructuralEq 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.