struct CheckedImageBuffer<'a> {
_image: FlatSamples<'a>,
_width: u32,
_height: u32,
_color: ExtendedColorType,
}
Expand description
Encapsulate the checking system in the type system. Non of the fields are actually accessed but requiring them forces us to validly construct the struct anyways.
Fields§
§_image: FlatSamples<'a>
§_width: u32
§_height: u32
§_color: ExtendedColorType
Implementations§
source§impl<'a> CheckedImageBuffer<'a>
impl<'a> CheckedImageBuffer<'a>
fn check( image: FlatSamples<'a>, width: u32, height: u32, color: ExtendedColorType, ) -> ImageResult<CheckedImageBuffer<'a>>
Auto Trait Implementations§
impl<'a> Freeze for CheckedImageBuffer<'a>
impl<'a> RefUnwindSafe for CheckedImageBuffer<'a>
impl<'a> Send for CheckedImageBuffer<'a>
impl<'a> Sync for CheckedImageBuffer<'a>
impl<'a> Unpin for CheckedImageBuffer<'a>
impl<'a> UnwindSafe for CheckedImageBuffer<'a>
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