1#[cfg(feature = "std")]
4pub use with_std::*;
5pub use without_std::*;
6
7pub trait PermSize
9where
10 Self::Container: AsRef<[usize]>,
11{
12 type Container;
13}
14
15mod without_std {
16 use super::*;
17
18 impl<const SIZE: usize> PermSize for Static<SIZE> {
19 type Container = [usize; SIZE];
20 }
21
22 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
24 pub struct Static<const SIZE: usize>;
25}
26
27#[cfg(feature = "std")]
28mod with_std {
29 use super::*;
30
31 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
33 pub struct Dynamic;
34
35 impl PermSize for Dynamic {
36 type Container = Vec<usize>;
37 }
38}