pub struct Adapted<'a> {
pub data: Cow<'a, [u8]>,
pub descriptor: PixelDescriptor,
pub width: u32,
pub rows: u32,
}use PixelCow via adapt_for_encode_cow; this packed compatibility type is retained for 0.2.x callers
Expand description
Result of format adaptation: the converted data and its descriptor.
Fields§
§data: Cow<'a, [u8]>use PixelCow via adapt_for_encode_cow; this packed compatibility type is retained for 0.2.x callers
Pixel data — borrowed if no conversion was needed, owned otherwise.
descriptor: PixelDescriptoruse PixelCow via adapt_for_encode_cow; this packed compatibility type is retained for 0.2.x callers
The pixel format of data.
width: u32use PixelCow via adapt_for_encode_cow; this packed compatibility type is retained for 0.2.x callers
Width of the pixel data.
rows: u32use PixelCow via adapt_for_encode_cow; this packed compatibility type is retained for 0.2.x callers
Number of rows.
Implementations§
Source§impl Adapted<'_>
impl Adapted<'_>
Sourcepub fn as_pixel_slice(&self) -> Result<PixelSlice<'_>, At<ConvertError>>
pub fn as_pixel_slice(&self) -> Result<PixelSlice<'_>, At<ConvertError>>
Borrow this compatibility result as a validated packed pixel view.