Trait SetElement

Source
pub trait SetElement: Sized + Sealed {
    type Storage: BitAnd<Output = Self::Storage> + BitAndAssign + BitOr<Output = Self::Storage> + BitOrAssign + BitXor<Output = Self::Storage> + BitXorAssign + Not<Output = Self::Storage> + PartialOrd + Binary + Copy;

    const ALL: Self::Storage;
    const NONE: Self::Storage;

    // Required methods
    fn count_possibilities(set: Self::Storage) -> u32;
    fn as_set(self) -> Set<Self>;
}
Expand description

Trait for types that can be stored in a Set

Required Associated Constants§

Source

const ALL: Self::Storage

Source

const NONE: Self::Storage

Required Associated Types§

Source

type Storage: BitAnd<Output = Self::Storage> + BitAndAssign + BitOr<Output = Self::Storage> + BitOrAssign + BitXor<Output = Self::Storage> + BitXorAssign + Not<Output = Self::Storage> + PartialOrd + Binary + Copy

Required Methods§

Source

fn count_possibilities(set: Self::Storage) -> u32

Source

fn as_set(self) -> Set<Self>

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.

Implementors§

Source§

impl SetElement for Cell

Source§

const ALL: u128 = 2_417_851_639_229_258_349_412_351u128

Source§

const NONE: u128 = 0u128

Source§

type Storage = u128

Source§

impl SetElement for House

Source§

const ALL: u32 = 134_217_727u32

Source§

const NONE: u32 = 0u32

Source§

type Storage = u32

Source§

impl SetElement for Line

Source§

const ALL: u32 = 262_143u32

Source§

const NONE: u32 = 0u32

Source§

type Storage = u32

Source§

impl SetElement for Position<House>

Source§

const ALL: u16 = 511u16

Source§

const NONE: u16 = 0u16

Source§

type Storage = u16

Source§

impl SetElement for Position<Line>

Source§

const ALL: u16 = 511u16

Source§

const NONE: u16 = 0u16

Source§

type Storage = u16

Source§

impl SetElement for Digit

Source§

const ALL: u16 = 511u16

Source§

const NONE: u16 = 0u16

Source§

type Storage = u16