Trait aoc_pos::GenPos

source ·
pub trait GenPos<const DIMS: usize>: Copy + Debug + Eq + Hash + Ord + Sized + From<[Self::Val; DIMS]> + Into<[Self::Val; DIMS]> + TryAdd<Output = Self> + TryMul<Self::Val, Output = Self> {
    type Val: Int;
    type Axis: GenAxis<DIMS>;

    const ZERO: Self;
    const MIN: Self;
    const MAX: Self;

    // Provided methods
    fn zero() -> Self { ... }
    fn as_array(self) -> [Self::Val; DIMS] { ... }
    fn into_iter(self) -> IntoIter<Self::Val, DIMS> { ... }
}

Required Associated Types§

source

type Val: Int

source

type Axis: GenAxis<DIMS>

Required Associated Constants§

source

const ZERO: Self

source

const MIN: Self

source

const MAX: Self

Provided Methods§

source

fn zero() -> Self

source

fn as_array(self) -> [Self::Val; DIMS]

source

fn into_iter(self) -> IntoIter<Self::Val, DIMS>

Implementors§

source§

impl<Val: Int> GenPos<2> for PosGeo<Val>

§

type Val = Val

§

type Axis = AxisGeo

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _

source§

impl<Val: Int> GenPos<2> for PosGeoHexLat<Val>

§

type Val = Val

§

type Axis = AxisGeoHexLat

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _

source§

impl<Val: Int> GenPos<2> for PosRowCol<Val>

§

type Val = Val

§

type Axis = AxisRowCol

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _

source§

impl<Val: Int> GenPos<2> for PosXY<Val>

§

type Val = Val

§

type Axis = AxisXY

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _

source§

impl<Val: Int> GenPos<2> for PosYX<Val>

§

type Val = Val

§

type Axis = AxisXY

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _

source§

impl<Val: Int> GenPos<3> for PosXYZ<Val>

§

type Val = Val

§

type Axis = AxisXYZ

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _

source§

impl<Val: Int> GenPos<4> for PosWXYZ<Val>

§

type Val = Val

§

type Axis = AxisWXYZ

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _

source§

impl<Val: Int> GenPos<4> for PosXYZT<Val>

§

type Val = Val

§

type Axis = AxisXYZT

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _

source§

impl<Val: Int> GenPos<4> for PosXYZW<Val>

§

type Val = Val

§

type Axis = AxisXYZW

source§

const ZERO: Self = _

source§

const MIN: Self = _

source§

const MAX: Self = _