[−][src]Struct mp4ameta::AtomT
A template representing a MPEG-4 audio metadata atom.
Fields
ident: IdentThe 4 byte identifier of the atom.
offset: usizeThe offset in bytes separating the head from the content.
content: ContentTThe content template of an atom template.
Implementations
impl AtomT[src]
pub fn with(ident: Ident, offset: usize, content: ContentT) -> Self[src]
Creates an atom template containing the provided content at a n byte offset.
pub fn with_raw_data(ident: Ident, offset: usize, data: DataT) -> Self[src]
Creates an atom template containing ContentT::RawData
with the provided data template.
pub 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 mut_child(&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(&self) -> Option<&Self>[src]
Returns a reference to the first children atom template, if present.
pub fn mut_first_child(&mut self) -> Option<&mut Self>[src]
Returns a mutable reference to 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 identifiers
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 PartialEq<AtomT> for AtomT[src]
impl StructuralPartialEq for AtomT[src]
Auto Trait Implementations
impl RefUnwindSafe for AtomT
impl Send for AtomT
impl Sync for AtomT
impl Unpin for AtomT
impl UnwindSafe for AtomT
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>,