GetMut2D

Trait GetMut2D 

Source
pub trait GetMut2D: Get2D {
    // Required method
    fn try_get_mut_xy<T: ToPrimitive>(
        &mut self,
        x: T,
        y: T,
    ) -> Result<&mut Self::Item, IndexError>;

    // Provided methods
    fn get_mut_xy<T: ToPrimitive>(&mut self, x: T, y: T) -> &mut Self::Item { ... }
    fn get_mut_p<T: ToPrimitive, P: IntoTuple2<T>>(
        &mut self,
        p: P,
    ) -> &mut Self::Item { ... }
    fn try_get_mut_p<T: ToPrimitive, P: IntoTuple2<T>>(
        &mut self,
        p: P,
    ) -> Result<&mut Self::Item, IndexError> { ... }
}

Required Methods§

Source

fn try_get_mut_xy<T: ToPrimitive>( &mut self, x: T, y: T, ) -> Result<&mut Self::Item, IndexError>

Provided Methods§

Source

fn get_mut_xy<T: ToPrimitive>(&mut self, x: T, y: T) -> &mut Self::Item

Source

fn get_mut_p<T: ToPrimitive, P: IntoTuple2<T>>( &mut self, p: P, ) -> &mut Self::Item

Source

fn try_get_mut_p<T: ToPrimitive, P: IntoTuple2<T>>( &mut self, p: P, ) -> Result<&mut Self::Item, IndexError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<D> GetMut2D for Vec<Vec<D>>

Source§

fn try_get_mut_xy<T: ToPrimitive>( &mut self, x: T, y: T, ) -> Result<&mut Self::Item, IndexError>

Source§

impl<P, C> GetMut2D for ImageBuffer<P, C>
where P: Pixel + 'static, P::Subpixel: 'static, C: Deref<Target = [P::Subpixel]> + DerefMut,

Available on crate feature image only.
Source§

fn try_get_mut_xy<T: ToPrimitive>( &mut self, x: T, y: T, ) -> Result<&mut Self::Item, IndexError>

Source§

impl<S: DataMut> GetMut2D for ArrayBase<S, Ix2>

Available on crate feature ndarray only.
Source§

fn try_get_mut_xy<T: ToPrimitive>( &mut self, x: T, y: T, ) -> Result<&mut Self::Item, IndexError>

Implementors§