pub enum Plane {
Rows,
Y,
U,
V,
A,
}Expand description
Which output a stride or buffer error is about.
§Examples
use webp::api::decode::{decode_into, ColorMode, Config, DecodeError, Output, Plane};
// A 2 by 2 image needs 8 + 8 bytes of RGBA rows.
let mut rows = [0_u8; 15];
let output = Output::Rows { data: &mut rows, stride: 8 };
let error = decode_into(&file, &Config::new(ColorMode::Rgba), output).unwrap_err();
assert_eq!(error, DecodeError::BufferTooShort { plane: Plane::Rows, len: 15, needed: 16 });Variants§
Rows
The packed rows of Output::Rows.
Y
The luma plane of YuvaPlanes.
U
The U chroma plane of YuvaPlanes.
V
The V chroma plane of YuvaPlanes.
A
The alpha plane of YuvaPlanes.
Trait Implementations§
impl Copy for Plane
impl Eq for Plane
impl StructuralPartialEq for Plane
Auto Trait Implementations§
impl Forget for Plane
impl Freeze for Plane
impl Move for Plane
impl RefUnwindSafe for Plane
impl Send for Plane
impl Sync for Plane
impl Unpin for Plane
impl UnsafeUnpin for Plane
impl UnwindSafe for Plane
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