scsys_core/state/traits/
state.rs

1/*
2    appellation: raw_state <module>
3    authors: @FL03
4*/
5
6/// [RawState] is a trait that defines the types of states
7pub trait RawState: Send + Sync + core::fmt::Debug {
8    private!();
9}
10
11/*
12 ************* Implementations *************
13*/
14impl<Q> RawState for Q
15where
16    Q: Send + Sync + core::fmt::Debug,
17{
18    seal!();
19}
20
21#[allow(unused_macros)]
22macro_rules! impl_raw_state {
23    (@impl $t:ty) => {
24        impl $crate::state::RawState for $t {
25            seal!();
26        }
27    };
28    ($($t:ty),* $(,)?) => {
29        $(
30            impl_raw_state!(@impl $t);
31        )*
32    };
33}
34
35// impl_raw_state! {
36//     u8, u16, u32, u64, u128, usize,
37//     i8, i16, i32, i64, i128, isize,
38//     f32, f64, bool, char, str,
39// }
40
41// impl<Q> RawState for &Q where Q: RawState {
42//     seal!();
43// }
44
45// impl<Q> RawState for &mut Q where Q: RawState {
46//     seal!();
47// }
48
49// impl<Q> RawState for [Q] where Q: RawState {
50//     seal!();
51// }
52
53// impl<Q> RawState for &[Q] where Q: RawState {
54//     seal!();
55// }
56
57// impl<Q> RawState for &mut [Q] where Q: RawState {
58//     seal!();
59// }