#[non_exhaustive]pub struct BufferLayoutPreference {
pub len: usize,
pub sample_format: SampleFormat,
pub sample_type: Option<DecodingSampleType>,
pub row_stride: Option<NonZeroUsize>,
pub planes: usize,
pub plane_stride: Option<NonZeroUsize>,
pub complete_len: usize,
}Expand description
Information on the byte buffer that should be supplied to the decoder.
This is relevant for Decoder::read_image_bytes and Decoder::read_chunk_bytes where the
caller provided buffer must fit the expectations of the decoder to be filled with data from the
current image.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.len: usizeMinimum byte size of the buffer to read image data.
sample_format: SampleFormatThe interpretation of each sample in the image.
We only support a uniform sample layout. Detailed information for mixed colors may be added in the future and will become available by explicit query. The same goes for the bit-depth of samples that must also be uniform.
sample_type: Option<DecodingSampleType>The type representation for each sample. Only available for depths and formats which the library can describe.
row_stride: Option<NonZeroUsize>Minimum number of bytes to represent a row of image data of the requested content.
planes: usizeNumber of planes in the image.
plane_stride: Option<NonZeroUsize>Number of bytes used to represent one plane.
complete_len: usizeNumber of bytes of data when reading all planes.
Trait Implementations§
Source§impl Clone for BufferLayoutPreference
impl Clone for BufferLayoutPreference
Source§fn clone(&self) -> BufferLayoutPreference
fn clone(&self) -> BufferLayoutPreference
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more