pub struct ImageLayout {
pub image_size: ImageSize,
pub channels: u8,
pub pixel_format: PixelFormat,
}Expand description
Image layout metadata (size, channels, pixel format).
Fields§
§image_size: ImageSizeImage size in pixels.
channels: u8Number of channels per pixel.
pixel_format: PixelFormatPixel data format.
Implementations§
Source§impl ImageLayout
impl ImageLayout
Sourcepub fn new(
image_size: ImageSize,
channels: u8,
pixel_format: PixelFormat,
) -> Self
pub fn new( image_size: ImageSize, channels: u8, pixel_format: PixelFormat, ) -> Self
Create a new image layout descriptor.
Trait Implementations§
Source§impl Clone for ImageLayout
impl Clone for ImageLayout
Source§fn clone(&self) -> ImageLayout
fn clone(&self) -> ImageLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ImageLayout
Source§impl Debug for ImageLayout
impl Debug for ImageLayout
impl Eq for ImageLayout
Source§impl PartialEq for ImageLayout
impl PartialEq for ImageLayout
impl StructuralPartialEq for ImageLayout
Auto Trait Implementations§
impl Freeze for ImageLayout
impl RefUnwindSafe for ImageLayout
impl Send for ImageLayout
impl Sync for ImageLayout
impl Unpin for ImageLayout
impl UnsafeUnpin for ImageLayout
impl UnwindSafe for ImageLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more