[][src]Struct metaflac::block::Picture

pub struct Picture {
    pub picture_type: PictureType,
    pub mime_type: String,
    pub description: String,
    pub width: u32,
    pub height: u32,
    pub depth: u32,
    pub num_colors: u32,
    pub data: Vec<u8>,
}

A structure representing a PICTURE block.

Fields

picture_type: PictureType

The picture type.

mime_type: String

The MIME type.

description: String

The description of the picture.

width: u32

The width of the picture in pixels.

height: u32

The height of the picture in pixels.

depth: u32

The color depth of the picture in bits-per-pixel.

num_colors: u32

For indexed-color pictures (e.g. GIF), the number of colors used, or 0 for non-indexed pictures.

data: Vec<u8>

The binary picture data.

Methods

impl Picture[src]

pub fn new() -> Picture[src]

Returns a new Picture with zero/empty values.

pub fn from_bytes(bytes: &[u8]) -> Result<Picture>[src]

Attempts to parse the bytes as a Picture block. Returns a Picture on success.

pub fn to_bytes(&self) -> Vec<u8>[src]

Returns a vector representation of the picture block suitable for writing to a file.

Trait Implementations

impl Clone for Picture[src]

impl Eq for Picture[src]

impl PartialEq<Picture> for Picture[src]

impl Debug for Picture[src]

Auto Trait Implementations

impl Send for Picture

impl Sync for Picture

impl Unpin for Picture

impl UnwindSafe for Picture

impl RefUnwindSafe for Picture

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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