pub trait Enumoid: Sized {
type Word: RawSizeWord;
const SIZE: usize;
const FIRST: Self;
const LAST: Self;
// Required method
fn into_word(self) -> Self::Word;
// Provided methods
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.
Required Associated Types§
Required Associated Constants§
Required Methods§
Provided Methods§
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> ⓘ
Object Safety§
This trait is not object safe.