[−][src]Enum mp4ameta::Content
An enum representing the different types of content an atom might have.
Variants
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 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,