Trait Set

Source
pub trait Set {
    type Output;

    // Required method
    fn set(&mut self, point: Point, value: Self::Output) -> Option<Self::Output>;
}
Expand description

This trait is used to set a value in a 2d array if it succeeds then the item that was at that index is returned. If the operation fails, either because the point is out of bounds or because the conversion from isize to usize fails, None is returned.

Required Associated Types§

Required Methods§

Source

fn set(&mut self, point: Point, value: Self::Output) -> Option<Self::Output>

Implementations on Foreign Types§

Source§

impl<A> Set for Vec<Vec<A>>

Source§

type Output = A

Source§

fn set(&mut self, point: Point, value: Self::Output) -> Option<Self::Output>

Source§

impl<A, const SIZE_INNER: usize, const SIZE_OUTER: usize> Set for [[A; SIZE_INNER]; SIZE_OUTER]

Source§

type Output = A

Source§

fn set(&mut self, point: Point, value: Self::Output) -> Option<Self::Output>

Implementors§