Enum img_parts::riff::RiffContent
source · [−]Expand description
The contents of a RIFF chunk
Variants
List
Data(Bytes)
Implementations
sourceimpl RiffContent
impl RiffContent
sourcepub fn len(&self) -> u32
pub fn len(&self) -> u32
Get the total size of this RiffContent
once it is encoded.
If this RiffContent
is a List
the size is the sum of:
- The kind (4 bytes) if this
List
has a kind. - The sum of the size of every
subchunk
.
If this RiffContent
is Data
the size is the length of the data.
sourcepub fn list(&self) -> Option<(Option<[u8; 4]>, &Vec<RiffChunk>)>
pub fn list(&self) -> Option<(Option<[u8; 4]>, &Vec<RiffChunk>)>
Get kind
and subchunks
of this RiffContent
if it is a List
.
Returns None
if it is Data
.
sourcepub fn data(&self) -> Option<&Bytes>
pub fn data(&self) -> Option<&Bytes>
Get the data
of this RiffContent
if it is Data
.
Returns None
if it is a List
.
sourcepub fn encoder(self) -> ImageEncoder<Self>ⓘNotable traits for ImageEncoder<I>impl<I: EncodeAt> Iterator for ImageEncoder<I> type Item = Bytes;
pub fn encoder(self) -> ImageEncoder<Self>ⓘNotable traits for ImageEncoder<I>impl<I: EncodeAt> Iterator for ImageEncoder<I> type Item = Bytes;
Returns an encoder for this RiffContent
Trait Implementations
sourceimpl Clone for RiffContent
impl Clone for RiffContent
sourcefn clone(&self) -> RiffContent
fn clone(&self) -> RiffContent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RiffContent
impl Debug for RiffContent
sourceimpl PartialEq<RiffContent> for RiffContent
impl PartialEq<RiffContent> for RiffContent
sourcefn eq(&self, other: &RiffContent) -> bool
fn eq(&self, other: &RiffContent) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RiffContent) -> bool
fn ne(&self, other: &RiffContent) -> bool
This method tests for !=
.
impl StructuralPartialEq for RiffContent
Auto Trait Implementations
impl RefUnwindSafe for RiffContent
impl Send for RiffContent
impl Sync for RiffContent
impl Unpin for RiffContent
impl UnwindSafe for RiffContent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more