pub struct Ppm<const W: usize, const H: usize> { /* private fields */ }Expand description
A NetPBM Portable PixMap (P3; PPM) image.
Implementations§
Source§impl<const W: usize, const H: usize> Ppm<W, H>
impl<const W: usize, const H: usize> Ppm<W, H>
Sourcepub fn new(rows: Vec<Vec<Pixel>>) -> Self
pub fn new(rows: Vec<Vec<Pixel>>) -> Self
Constructs a PPM image from the given row data.
This method will panic if there are not precisely H rows, or any of the rows do not contain precisely W pixels.
Trait Implementations§
Auto Trait Implementations§
impl<const W: usize, const H: usize> Freeze for Ppm<W, H>
impl<const W: usize, const H: usize> RefUnwindSafe for Ppm<W, H>
impl<const W: usize, const H: usize> Send for Ppm<W, H>
impl<const W: usize, const H: usize> Sync for Ppm<W, H>
impl<const W: usize, const H: usize> Unpin for Ppm<W, H>
impl<const W: usize, const H: usize> UnwindSafe for Ppm<W, H>
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> 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