[−][src]Struct mp4ameta::AtomT
A template representing a MPEG-4 audio metadata atom.
Fields
ident: Ident
The 4 byte identifier of the atom.
offset: usize
The offset in bytes separating the head from the content.
content: ContentT
The content template of an atom template.
Implementations
impl AtomT
[src]
pub const fn new(ident: Ident, offset: usize, content: ContentT) -> Self
[src]
Creates an atom template containing the provided content at a n byte offset.
pub const fn data_atom() -> Self
[src]
Creates a data atom template containing ContentT::TypedData
.
pub fn child(&self, ident: Ident) -> Option<&Self>
[src]
Returns a reference to the first children atom template matching the identifier, if present.
pub fn first_child(&self) -> Option<&Self>
[src]
Returns a reference to the first children atom template, if present.
pub fn child_mut(&mut self, ident: Ident) -> Option<&mut Self>
[src]
Returns a mutable reference to the first children atom template matching the identifier, if present.
pub fn first_child_mut(&mut self) -> Option<&mut Self>
[src]
Returns a mutable reference to the first children atom template, if present.
pub fn take_child(self, ident: Ident) -> Option<Self>
[src]
Consumes self and returns the first children atom template matching the identifier
, if present.
pub fn take_first_child(self) -> Option<Self>
[src]
Consumes self and returns the first children atom template, if present.
pub fn parse_next(&self, reader: &mut impl Read + Seek) -> Result<Atom>
[src]
Attempts to parse an atom, that matches the template, from the reader
. This should only be
used if the atom has to be in this exact position, if the parsed and expected identifier
s
don't match this will return an error.
pub fn parse(&self, reader: &mut impl Read + Seek) -> Result<Atom>
[src]
Attempts to parse an atom, that matches the template, from the reader.
pub fn parse_content(
&self,
reader: &mut impl Read + Seek,
length: usize
) -> Result<Content>
[src]
&self,
reader: &mut impl Read + Seek,
length: usize
) -> Result<Content>
Attempts to parse the atom template's content from the reader.
Trait Implementations
impl Clone for AtomT
[src]
impl Debug for AtomT
[src]
impl Default for AtomT
[src]
impl Eq for AtomT
[src]
impl PartialEq<AtomT> for AtomT
[src]
impl StructuralEq for AtomT
[src]
impl StructuralPartialEq for AtomT
[src]
Auto Trait Implementations
impl RefUnwindSafe for AtomT
[src]
impl Send for AtomT
[src]
impl Sync for AtomT
[src]
impl Unpin for AtomT
[src]
impl UnwindSafe for AtomT
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,