[−][src]Enum mp4ameta::Content
A structure representing the different types of content an Atom might have.
Variants
A value containing Vec<Atom>
.
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
.
Methods
impl Content
[src]
pub fn atoms() -> Content
[src]
Creates a new content of type Content::Atoms
containing an empty Vec
.
pub fn atom(atom: Atom) -> Content
[src]
Creates a new content of type Content::Atoms
containing the atom.
pub fn data_atom() -> Content
[src]
Creates a new content of type Content::Atoms
containing a data Atom
.
pub fn data_atom_with(data: Data) -> Content
[src]
Creates a new content of type Content::Atoms
containing a data Atom
with the data.
pub fn atom_with(
identifier: [u8; 4],
offset: usize,
content: Content
) -> Content
[src]
identifier: [u8; 4],
offset: usize,
content: Content
) -> Content
Creates a new Content
of type Content::Atoms
containing a new Atom
with the identifier,
offset and content.
pub fn add_atom(self, atom: Atom) -> Content
[src]
Adds the atom to the list of children atoms if self
is of type Content::Atoms
.
pub fn add_data_atom(self) -> Content
[src]
Adds a data Atom
to the list of children if self
is of type Content::Atoms
.
pub fn add_atom_with(
self,
identifier: [u8; 4],
offset: usize,
content: Content
) -> Content
[src]
self,
identifier: [u8; 4],
offset: usize,
content: Content
) -> Content
Adds a new Atom
with the provided identifier, offset and content to the list of children if
self
is of type Content::Atoms
.
pub fn len(&self) -> usize
[src]
Returns the length in bytes.
pub fn parse(
&mut self,
reader: &mut impl Read + Seek,
length: usize
) -> Result<()>
[src]
&mut self,
reader: &mut impl Read + Seek,
length: usize
) -> Result<()>
Attempts to parse itself from the reader.
pub fn write_to(&self, writer: &mut impl Write) -> Result<()>
[src]
Trait Implementations
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>,