pub struct DecodedImage<'alloc> {
pub width: u32,
pub height: u32,
pub data: Bytes<'alloc>,
}Available on crate feature
kitty-graphics only.Expand description
Result of decoding an image.
The data buffer must be allocated through the allocator provided to the
decode callback. The library takes ownership and will free it with the
same allocator.
Fields§
§width: u32Image width in pixels.
height: u32Image height in pixels.
data: Bytes<'alloc>Byte buffer containing the decoded RGBA pixel data.
Trait Implementations§
Source§impl<'alloc> Debug for DecodedImage<'alloc>
impl<'alloc> Debug for DecodedImage<'alloc>
Source§impl From<DecodedImage<'_>> for SysImage
impl From<DecodedImage<'_>> for SysImage
Source§fn from(value: DecodedImage<'_>) -> Self
fn from(value: DecodedImage<'_>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'alloc> !Send for DecodedImage<'alloc>
impl<'alloc> !Sync for DecodedImage<'alloc>
impl<'alloc> Freeze for DecodedImage<'alloc>
impl<'alloc> RefUnwindSafe for DecodedImage<'alloc>
impl<'alloc> Unpin for DecodedImage<'alloc>
impl<'alloc> UnsafeUnpin for DecodedImage<'alloc>
impl<'alloc> UnwindSafe for DecodedImage<'alloc>
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