Struct adder_codec_core::PlaneSize
source · pub struct PlaneSize { /* private fields */ }
Expand description
The size of the image plane in pixels
Implementations§
source§impl PlaneSize
impl PlaneSize
sourcepub fn new(width: u16, height: u16, channels: u8) -> Result<Self, PlaneError>
pub fn new(width: u16, height: u16, channels: u8) -> Result<Self, PlaneError>
Create a new PlaneSize
with the given width, height, and channels
sourcepub fn area_wh(&self) -> usize
pub fn area_wh(&self) -> usize
The total number of 2D pixels in the image plane, across the height and width dimension
sourcepub fn area_wc(&self) -> usize
pub fn area_wc(&self) -> usize
The total number of 2D pixels in the image plane, across the width and channel dimension
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PlaneSize
impl Send for PlaneSize
impl Sync for PlaneSize
impl Unpin for PlaneSize
impl UnwindSafe for PlaneSize
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