[−][src]Struct mp4ameta::Atom
A struct that represents 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: ContentThe content of an atom.
Implementations
impl Atom[src]
pub fn with(ident: Ident, offset: usize, content: Content) -> Self[src]
Creates an atom containing the provided content at a n byte offset.
pub fn with_raw_data(ident: Ident, offset: usize, data: Data) -> Self[src]
Creates an atom with the identifier, containing
Content::RawData with the provided data.
pub fn with_typed_data(ident: Ident, offset: usize, data: Data) -> Self[src]
Creates an atom with the identifier, containing
Content::TypedData with the provided data.
pub fn data_atom_with(data: Data) -> Self[src]
Creates a data atom containing Content::TypedData
with the provided data.
pub fn len(&self) -> usize[src]
Returns the length of the atom in bytes.
pub fn is_empty(&self) -> bool[src]
Returns true if the atom has no offset or content and only consists of it's 8 byte head.
pub fn child(&self, ident: Ident) -> Option<&Self>[src]
Returns a reference to the first children atom 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 matching the identifier, if
present.
pub fn first_child(&self) -> Option<&Self>[src]
Return a reference to the first children atom, if present.
pub fn mut_first_child(&mut self) -> Option<&mut Self>[src]
Returns a mutable reference to the first children atom, if present.
pub fn write_to(&self, writer: &mut impl Write) -> Result<()>[src]
Attempts to write the atom to the writer.
pub fn check_filetype(&self) -> Result<()>[src]
Checks if the filetype is valid, returns an error otherwise.
Trait Implementations
impl Clone for Atom[src]
impl Debug for Atom[src]
impl PartialEq<Atom> for Atom[src]
impl StructuralPartialEq for Atom[src]
Auto Trait Implementations
impl RefUnwindSafe for Atom
impl Send for Atom
impl Sync for Atom
impl Unpin for Atom
impl UnwindSafe for Atom
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>,