Skip to main content

WebPDecBuffer

Struct WebPDecBuffer 

Source
pub struct WebPDecBuffer<'a> {
    pub colorspace: WEBP_CSP_MODE,
    pub width: i32,
    pub height: i32,
    pub slow_memory: bool,
    pub u: WebPDecBufferPlanes,
    pub pad: [u32; 4],
    pub storage: PlaneStorage<'a, u8>,
}
Expand description

Generic structure describing the output sample buffer (C: WebPDecBuffer).

storage is C’s private_memory when the object allocated the samples, and the caller’s slices when C would set is_external_memory. The C field is_external_memory is therefore the variant of storage, and its values 2 and more, which mark slow external memory, are slow_memory (ADR 0003, amended 2026-11-07, WP12).

Fields§

§colorspace: WEBP_CSP_MODE

Colorspace of the samples (C: colorspace).

§width: i32

Width in pixels (C: width).

§height: i32

Height in pixels (C: height).

§slow_memory: bool

Slow external memory (C: is_external_memory >= 2): the decoder avoids multiple reads and writes of it. Meaningful only with External storage, and false for the other storages.

§u: WebPDecBufferPlanes

The planes of the buffer, selected by colorspace (C: u).

§pad: [u32; 4]

Padding for later use.

§storage: PlaneStorage<'a, u8>

The memory that holds the samples (C: private_memory, or the caller’s memory).

Trait Implementations§

Source§

impl<'a> Debug for WebPDecBuffer<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WebPDecBuffer<'_>

Source§

fn default() -> Self

An empty buffer in MODE_RGB (C: WebPInitDecBuffer zeroes the structure).

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for WebPDecBuffer<'a>

§

impl<'a> Forget for WebPDecBuffer<'a>

§

impl<'a> Freeze for WebPDecBuffer<'a>

§

impl<'a> Move for WebPDecBuffer<'a>

§

impl<'a> RefUnwindSafe for WebPDecBuffer<'a>

§

impl<'a> Send for WebPDecBuffer<'a>

§

impl<'a> Sync for WebPDecBuffer<'a>

§

impl<'a> Unpin for WebPDecBuffer<'a>

§

impl<'a> UnsafeUnpin for WebPDecBuffer<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.