pub struct ImageReadMapping<'buffer> { /* private fields */ }Expand description
A wrapper around a slice of bytes representing an image.
An ImageReadMapping may only be created via RowPaddedBuffer::read().
Implementations§
Source§impl<'buffer> ImageReadMapping<'buffer>
impl<'buffer> ImageReadMapping<'buffer>
Sourcepub unsafe fn as_image<P>(&self) -> SubImage<ImageHolder<'_, P>>where
P: Pixel + 'static,
pub unsafe fn as_image<P>(&self) -> SubImage<ImageHolder<'_, P>>where
P: Pixel + 'static,
View as an image::SubImage.
Unsafe: P::TEXTURE_FORMAT MUST match the texture format / image type used to create the
wrapped RowPaddedBuffer! If this is not the case, may result in undefined behavior!
Auto Trait Implementations§
impl<'buffer> Freeze for ImageReadMapping<'buffer>
impl<'buffer> !RefUnwindSafe for ImageReadMapping<'buffer>
impl<'buffer> !Send for ImageReadMapping<'buffer>
impl<'buffer> !Sync for ImageReadMapping<'buffer>
impl<'buffer> Unpin for ImageReadMapping<'buffer>
impl<'buffer> !UnwindSafe for ImageReadMapping<'buffer>
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