[][src]Enum img_parts::riff::RiffContent

pub enum RiffContent {
    List {
        kind: Option<[u8; 4]>,
        subchunks: Vec<RiffChunk>,
    },
    Data(Bytes),
}

The contents of a RIFF chunk

Variants

List

Fields of List

kind: Option<[u8; 4]>subchunks: Vec<RiffChunk>
Data(Bytes)

Implementations

impl RiffContent[src]

pub fn len(&self) -> u32[src]

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.

pub fn list(&self) -> Option<(&Option<[u8; 4]>, &Vec<RiffChunk>)>[src]

Get kind and subchunks of this RiffContent if it is a List.

Returns None if it is Data.

pub fn data(&self) -> Option<Bytes>[src]

Get the data of this RiffContent if it is Data.

Returns None if it is a List.

pub fn encoder(self) -> ImageEncoder<Self>

Notable traits for ImageEncoder<I>

impl<I: EncodeAt> Iterator for ImageEncoder<I> type Item = Bytes;
[src]

Returns an encoder for this RiffContent

Trait Implementations

impl Clone for RiffContent[src]

impl Debug for RiffContent[src]

impl PartialEq<RiffContent> for RiffContent[src]

impl StructuralPartialEq for RiffContent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.