pub struct BlockPicture {
pub picture_type: PictureType,
pub mime_type: String,
pub description: String,
pub width: u32,
pub height: u32,
pub depth: u32,
pub colors: u32,
pub data: Vec<u8>,
}Fields§
§picture_type: PictureType<32> The picture type according to the ID3v2 APIC frame Others are reserved and should not be used. There may only be one each of picture type 1 and 2 in a file.
mime_type: String<n*8> The MIME type string, in printable ASCII characters 0x20-0x7e. The MIME type may also be –> to signify that the data part is a URL of the picture instead of the picture data itself.
description: String<n*8> The description of the picture, in UTF-8.
width: u32<32> The width of the picture in pixels.
height: u32<32> The height of the picture in pixels.
depth: u32<32> The color depth of the picture in bits-per-pixel.
colors: u32<32> For indexed-color pictures (e.g. GIF), the number of colors used, or 0 for non-indexed pictures.
data: Vec<u8><n*8> The binary picture data.
Implementations§
Source§impl BlockPicture
impl BlockPicture
pub fn new<P: AsRef<Path>>( file: P, picture_type: PictureType, description: String, ) -> Result<Self>
pub fn color_indexed(&self) -> bool
Trait Implementations§
Source§impl Debug for BlockPicture
impl Debug for BlockPicture
Source§impl Decode for BlockPicture
impl Decode for BlockPicture
Auto Trait Implementations§
impl Freeze for BlockPicture
impl RefUnwindSafe for BlockPicture
impl Send for BlockPicture
impl Sync for BlockPicture
impl Unpin for BlockPicture
impl UnwindSafe for BlockPicture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more