[][src]Enum mp4ameta::Content

pub enum Content {
    Atoms(Vec<Atom>),
    RawData(Data),
    TypedData(Data),
    Empty,
}

An enum representing the different types of content an atom might have.

Variants

Atoms(Vec<Atom>)

A value containing a list of children atoms.

RawData(Data)

A value containing raw data.

TypedData(Data)

A value containing data defined by a Table 3-5 Well-known data types code.

Empty

Empty content.

Implementations

impl Content[src]

pub fn atoms() -> Self[src]

Creates new empty content of type Self::Atoms.

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

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

pub fn data_atom_with(data: Data) -> Self[src]

Creates new content of type Self::Atoms containing a data Atom with the data.

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

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

pub fn add_atom(self, atom: Atom) -> Self[src]

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

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

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

pub fn len(&self) -> usize[src]

Returns the length in bytes.

pub fn is_empty(&self) -> bool[src]

Returns true if the content is empty.

pub fn write_to(&self, writer: &mut impl Write) -> Result<()>[src]

Attempts to write the content to the writer.

Trait Implementations

impl Clone for Content[src]

impl Debug for Content[src]

impl PartialEq<Content> for Content[src]

impl StructuralPartialEq for Content[src]

Auto Trait Implementations

impl RefUnwindSafe for Content

impl Send for Content

impl Sync for Content

impl Unpin for Content

impl UnwindSafe for Content

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.