Struct image_iter::ReinterpretedImageMut

source ·
pub struct ReinterpretedImageMut<'a, FMT> {
    pub orig: &'a mut [u8],
    pub width: u32,
    pub height: u32,
    pub stride: usize,
    pub fmt: PhantomData<FMT>,
}
Expand description

A view of mutable image to have pixel format FMT.

Fields§

§orig: &'a mut [u8]§width: u32§height: u32§stride: usize§fmt: PhantomData<FMT>

Trait Implementations§

source§

impl<'a, FMT> ImageData<FMT> for ReinterpretedImageMut<'a, FMT>

source§

fn width(&self) -> u32

Number of pixel columns in the image. Note: this is not the stride.
source§

fn height(&self) -> u32

Number of pixel rows in the image.
source§

fn buffer_ref(&self) -> ImageBufferRef<'_, FMT>

Returns the image buffer specified by pixel format F. Read more
source§

fn buffer(self) -> ImageBuffer<FMT>

Returns the image buffer specified by pixel format F. Read more
source§

fn image_data(&self) -> &[u8]

Returns the raw image data as specified by pixel format F. Read more
source§

impl<'a, FMT> ImageMutData<FMT> for ReinterpretedImageMut<'a, FMT>

source§

fn buffer_mut_ref(&mut self) -> ImageBufferMutRef<'_, FMT>

Returns the image mutable buffer specified by pixel format F. Read more
source§

impl<'a, FMT> Stride for ReinterpretedImageMut<'a, FMT>

source§

fn stride(&self) -> usize

the width (in bytes) of each row of image data Read more

Auto Trait Implementations§

§

impl<'a, FMT> Freeze for ReinterpretedImageMut<'a, FMT>

§

impl<'a, FMT> RefUnwindSafe for ReinterpretedImageMut<'a, FMT>
where FMT: RefUnwindSafe,

§

impl<'a, FMT> Send for ReinterpretedImageMut<'a, FMT>
where FMT: Send,

§

impl<'a, FMT> Sync for ReinterpretedImageMut<'a, FMT>
where FMT: Sync,

§

impl<'a, FMT> Unpin for ReinterpretedImageMut<'a, FMT>
where FMT: Unpin,

§

impl<'a, FMT> !UnwindSafe for ReinterpretedImageMut<'a, FMT>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<S, F> AsImageData<F> for S
where S: ImageData<F>,

source§

fn as_image_data(&self) -> &dyn ImageData<F>

source§

impl<S, F> AsImageStride<F> for S
where S: ImageStride<F>,

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<S, F> ImageStride<F> for S
where S: ImageData<F> + Stride, F: PixelFormat,

source§

impl<S, F> ImageStrideMut<F> for S
where S: ImageMutData<F> + Stride, F: PixelFormat,

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<S, F> ImageStride<F> for S
where S: ImageData<F> + Stride,