Enum mp4ameta::Data[][src]

pub enum Data {
    Reserved(Vec<u8>),
    Utf8(String),
    Utf16(String),
    Jpeg(Vec<u8>),
    Png(Vec<u8>),
    BeSigned(Vec<u8>),
    Bmp(Vec<u8>),
}
Expand description

An enum that holds different types of data defined by Table 3-5 Well-known data types.

Variants

Reserved(Vec<u8>)

A value containing reserved type data inside a Vec<u8>.

Utf8(String)

A value containing a String decoded from, or to be encoded to utf-8.

Utf16(String)

A value containing a String decoded from, or to be encoded to utf-16.

Jpeg(Vec<u8>)

A value containing jpeg byte data inside a Vec<u8>.

Png(Vec<u8>)

A value containing png byte data inside a Vec<u8>.

BeSigned(Vec<u8>)

A value containing big endian signed integer inside a Vec<u8>.

Bmp(Vec<u8>)

A value containing bmp byte data inside a Vec<u8>.

Implementations

Returns the length of the raw data in bytes.

Returns true if the data is of length 0, false otherwise.

Returns true if self is of type Self::Reserved or Self::BeSigned, false otherwise.

Returns true if self is of type Self::Utf8 or Self::Utf16, false otherwise.

Returns true if self is of type Self::Jpeg, Self::Png or Self::Bmp false otherwise.

Returns true if self is of type Self::Reserved false otherwise.

Returns true if self is of type Self::Utf8 false otherwise.

Returns true if self is of type Self::Utf16 false otherwise.

Returns true if self is of type Self::Jpeg false otherwise.

Returns true if self is of type Self::Png false otherwise.

Returns true if self is of type Self::BeSigned false otherwise.

Returns true if self is of type Self::Bmp false otherwise.

Returns a reference to byte data if self is of type Self::Reserved or Self::BeSigned.

Returns a mutable reference to byte data if self is of type Self::Reserved or Self::BeSigned.

Consumes self and returns byte data if self is of type Self::Reserved or Self::BeSigned.

Returns a reference to a string if self is of type Self::Utf8 or Self::Utf16.

Returns a mutable reference to a string if self is of type Self::Utf8 or Self::Utf16.

Consumes self and returns a string if self is of type Self::Utf8 or Self::Utf16.

Returns a reference to an image if self is of type Self::Jpeg, Self::Png or Self::Bmp.

Returns a mutable reference to an image if self is of type Self::Jpeg, Self::Png or Self::Bmp.

Consumes self and returns an image if self is of type Self::Jpeg, Self::Png or Self::Bmp.

Returns a reference to image data if self is of type Self::Jpeg, Self::Png or Self::Bmp.

Returns a mutable reference to image data if self is of type Self::Jpeg, Self::Png or Self::Bmp.

Consumes self and returns image data if self is of type Self::Jpeg, Self::Png or Self::Bmp.

Returns a reference to byte data if self is of type Self::Reserved.

Returns a reference to a string if self is of type Self::Utf8.

Returns a reference to a string if self is of type Self::Utf16.

Returns a reference to image data if self is of type Self::Jpeg.

Returns a reference to image data if self is of type Self::Png.

Returns a reference to byte data if self is of type Self::BeSigned.

Returns a reference to byte data if self is of type Self::Bmp.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.