Struct aoc_grid::GridExtend

source ·
pub struct GridExtend<Inner, Pos, const DIMS: usize>where
    Inner: GridView<Pos, DIMS>,
    Pos: GridPos<DIMS>,{ /* private fields */ }

Trait Implementations§

source§

impl<Inner, Pos, const DIMS: usize> Clone for GridExtend<Inner, Pos, DIMS>where Inner: GridView<Pos, DIMS> + Clone, Pos: GridPos<DIMS> + Clone, Pos::Coord: Clone,

source§

fn clone(&self) -> GridExtend<Inner, Pos, DIMS>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'grd, Inner, Pos, const DIMS: usize> Debug for &'grd GridExtend<Inner, Pos, DIMS>where Inner: GridView<Pos, DIMS>, Inner::Item: Default, Pos: GridPos<DIMS>,

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'grd, Inner, Pos, const DIMS: usize> GridView<Pos, DIMS> for &'grd GridExtend<Inner, Pos, DIMS>where Inner: GridView<Pos, DIMS>, Inner::Item: Default, Pos: GridPos<DIMS>,

§

type Item = <Inner as GridView<Pos, DIMS>>::Item

§

type Cursors = GridExtendCursors<Pos, DIMS>

source§

fn start(self) -> Pos

source§

fn end(self) -> Pos

source§

fn size(self) -> Pos

source§

fn get_trusted(self, native: Pos, idx: usize) -> Self::Item

source§

fn offset(self, pos: Pos) -> NumResult<GridOffset<Pos, DIMS>>

source§

fn cursor(self, pos: Pos) -> Option<GridCursor<Pos, DIMS>>

source§

fn cursors(self) -> GridExtendCursors<Pos, DIMS> where Self: Sized,

source§

fn len(self) -> usize

source§

fn is_empty(self) -> bool

source§

fn keys(self) -> GridKeysIter<Pos, DIMS>

source§

fn first_key(self) -> Pos

source§

fn last_key(self) -> Pos

source§

fn get(self, pos: Pos) -> Option<Self::Item>

source§

fn get_native(self, native: Pos) -> Option<Self::Item>

source§

fn map<Storage, MapFn, Output>( self, map_fn: MapFn ) -> GridBuf<Storage, Pos, DIMS>where MapFn: FnMut(GridCursor<Pos, DIMS>) -> Output, Storage: Clone + GridStorage + FromIterator<Output>,

source§

fn try_map<Storage, MapFn, Output, Error>( self, map_fn: MapFn ) -> Result<GridBuf<Storage, Pos, DIMS>, Error>where MapFn: FnMut(GridCursor<Pos, DIMS>) -> Result<Output, Error>, Storage: Clone + GridStorage + FromIterator<Output>,

source§

impl<'grd, Inner, Pos, const DIMS: usize> GridViewIter<Pos, DIMS> for &'grd GridExtend<Inner, Pos, DIMS>where Inner: GridViewIter<Pos, DIMS>, Inner::Item: Default, Pos: GridPos<DIMS>,

§

type Values = GridExtendIter<<Inner as GridViewIter<Pos, DIMS>>::Values, Pos, DIMS>

source§

fn values(self) -> Self::Values

source§

fn iter(self) -> GridIter<Self::Values, Pos, DIMS>where Self: Copy + Sized,

source§

fn to_buf<Storage>(self) -> GridBuf<Storage, Pos, DIMS>where Storage: Clone + GridStorage + FromIterator<Self::Item>,

source§

impl<Inner, Pos, const DIMS: usize> Copy for GridExtend<Inner, Pos, DIMS>where Inner: GridView<Pos, DIMS> + Copy, Pos: GridPos<DIMS> + Copy, Pos::Coord: Copy,

Auto Trait Implementations§

§

impl<Inner, Pos, const DIMS: usize> RefUnwindSafe for GridExtend<Inner, Pos, DIMS>where Inner: RefUnwindSafe, Pos: RefUnwindSafe, <Pos as GridPos<DIMS>>::Coord: RefUnwindSafe,

§

impl<Inner, Pos, const DIMS: usize> Send for GridExtend<Inner, Pos, DIMS>where Inner: Send, Pos: Send, <Pos as GridPos<DIMS>>::Coord: Send,

§

impl<Inner, Pos, const DIMS: usize> Sync for GridExtend<Inner, Pos, DIMS>where Inner: Sync, Pos: Sync, <Pos as GridPos<DIMS>>::Coord: Sync,

§

impl<Inner, Pos, const DIMS: usize> Unpin for GridExtend<Inner, Pos, DIMS>where Inner: Unpin, Pos: Unpin, <Pos as GridPos<DIMS>>::Coord: Unpin,

§

impl<Inner, Pos, const DIMS: usize> UnwindSafe for GridExtend<Inner, Pos, DIMS>where Inner: UnwindSafe, Pos: UnwindSafe, <Pos as GridPos<DIMS>>::Coord: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<From, To> QuickInto<To> for Fromwhere To: QuickFrom<From>,

source§

fn quick_into(self) -> To

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.