scsys_traits/
container.rs1pub unsafe trait RawContainer<T> {
8 type Cont<V>;
9
10 private!();
11}
12
13macro_rules! impl_raw_container {
18 ($($($t:ident)::*<$T:ident>),* $(,)?) => {
19 $(
20 impl_raw_container!(@impl $($t)::*<$T>);
21 )*
22 };
23 (@impl $($t:ident)::*<$T:ident>) => {
24 unsafe impl<$T> RawContainer<T> for $($t)::*<$T> {
25 type Cont<V> = $($t)::*<V>;
26
27 seal!();
28 }
29 };
30}
31
32#[cfg(feature = "alloc")]
33impl_raw_container! {
34 alloc::vec::Vec<T>,
35 alloc::boxed::Box<T>,
36 alloc::rc::Rc<T>,
37 alloc::sync::Arc<T>,
38 alloc::collections::BTreeSet<T>,
39 alloc::collections::LinkedList<T>,
40}