Struct GainImageMut

Source
pub struct GainImageMut<'a, T: Clone + Copy + Default + Debug, const N: usize> {
    pub data: BufferStore<'a, T>,
    pub width: usize,
    pub height: usize,
    pub stride: usize,
}
Expand description

Mutable image store

Fields§

§data: BufferStore<'a, T>§width: usize§height: usize§stride: usize

Image stride, items per row, might be 0

Implementations§

Source§

impl<'a, T: Clone + Copy + Default + Debug, const N: usize> GainImageMut<'a, T, N>

Source

pub fn alloc(width: usize, height: usize) -> Self

Allocates default image layout for given [FastBlurChannels]

Source

pub fn borrow(arr: &'a mut [T], width: usize, height: usize) -> Self

Mutable borrows existing data Stride will be default width * channels.channels()

Source

pub fn row_stride(&self) -> usize

Returns row stride

Source

pub fn check_layout(&self) -> Result<(), ForgeError>

Checks if layout matches necessary requirements

Source

pub fn size_matches( &self, other: &GainImage<'_, T, N>, ) -> Result<(), ForgeError>

Checks if it is matches the size of the other image

Source

pub fn size_matches_mut( &self, other: &GainImageMut<'_, T, N>, ) -> Result<(), ForgeError>

Checks if it is matches the size of the other image

Source

pub fn to_immutable_ref(&self) -> GainImage<'_, T, N>

Source§

impl<const N: usize> GainImageMut<'_, u8, N>

Source

pub fn expand_to_u16(&self, target_bit_depth: usize) -> GainImageMut<'_, u16, N>

Auto Trait Implementations§

§

impl<'a, T, const N: usize> Freeze for GainImageMut<'a, T, N>

§

impl<'a, T, const N: usize> RefUnwindSafe for GainImageMut<'a, T, N>
where T: RefUnwindSafe,

§

impl<'a, T, const N: usize> Send for GainImageMut<'a, T, N>
where T: Send,

§

impl<'a, T, const N: usize> Sync for GainImageMut<'a, T, N>
where T: Sync,

§

impl<'a, T, const N: usize> Unpin for GainImageMut<'a, T, N>
where T: Unpin,

§

impl<'a, T, const N: usize> !UnwindSafe for GainImageMut<'a, T, N>

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<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<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>,

Source§

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>,

Source§

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.