1#[doc(inline)]
9pub use self::nstate::{NState, NStateKind};
10pub mod nstate;
13
14mod impls {
15 pub mod impl_ops;
16 pub mod impl_repr;
17 pub mod impl_state;
18}
19
20pub(crate) mod prelude {
21 #[doc(inline)]
22 pub use super::nstate::*;
23 #[doc(inline)]
24 pub use super::{RawState, Stateful};
25}
26
27#[derive(Clone, Copy, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
29#[cfg_attr(
30 feature = "serde",
31 derive(serde::Deserialize, serde::Serialize),
32 serde(default, transparent)
33)]
34#[repr(transparent)]
35pub struct State<Q = usize>(pub Q);
36
37pub trait Stateful {
39 type State: RawState;
40}
41
42pub trait RawState {
44 type Item;
45
46 private!();
47}
48
49impl<Q, T> RawState for NState<Q, T> {
53 type Item = T;
54
55 seal!();
56}
57
58impl<Q, T> Stateful for NState<Q, T> {
59 type State = NState<Q, T>;
60}