pub(super) struct SimpleGrid {
pub(super) grid: Vec<Vec<i32>>,
pub(super) width: i32,
pub(super) height: i32,
pub(super) outside: i32,
}Fields§
§grid: Vec<Vec<i32>>§width: i32§height: i32§outside: i32Implementations§
Source§impl SimpleGrid
impl SimpleGrid
pub(super) fn new(width: i32, height: i32, outside: i32) -> Self
pub(super) fn get(&self, x: i32, y: i32) -> i32
pub(super) fn set_cell(&mut self, x: i32, y: i32, value: i32)
pub(super) fn set_range( &mut self, x0: i32, y0: i32, x1: i32, y1: i32, value: i32, )
pub(super) fn setif(&mut self, x: i32, y: i32, if_value: i32, value: i32)
pub(super) fn edges_to(&self, x: i32, y: i32, value: i32) -> bool
Auto Trait Implementations§
impl Freeze for SimpleGrid
impl RefUnwindSafe for SimpleGrid
impl Send for SimpleGrid
impl Sync for SimpleGrid
impl Unpin for SimpleGrid
impl UnsafeUnpin for SimpleGrid
impl UnwindSafe for SimpleGrid
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreWraps this value in an
Arc<SyncMutex<>>