Trait enumoid::Enumoid[][src]

pub trait Enumoid: Sized {
    type Word: AsPrimitive<usize> + FromPrimitive + PrimInt + Debug;

    const SIZE: usize;

    fn into_word(self) -> Self::Word;

    fn from_word(value: Self::Word) -> Option<Self> { ... }
fn next(self) -> Option<Self> { ... }
fn prev(self) -> Option<Self> { ... }
fn next_wrapped(self) -> Self { ... }
fn prev_wrapped(self) -> Self { ... }
fn iter(
    ) -> Map<<Self as Enumoid>::WordRange, fn(_: <Self as Enumoid>::Word) -> Self> { ... }
fn iter_until(
        until: Self
    ) -> Map<<Self as Enumoid>::WordRange, fn(_: <Self as Enumoid>::Word) -> Self> { ... }
fn iter_from(
        from: Self
    ) -> Map<<Self as Enumoid>::WordRange, fn(_: <Self as Enumoid>::Word) -> Self> { ... }
fn iter_from_until(
        from: Self,
        until: Self
    ) -> Map<<Self as Enumoid>::WordRange, fn(_: <Self as Enumoid>::Word) -> Self> { ... } }
Expand description

Trait for enumerable types.

Some members are hidden. Impls should only be defined via the Enumoid derive macro.

Associated Types

Associated Constants

Required methods

Provided methods

Implementors