resource_bound_core/
lib.rs

1//!
2//! resource-bound-core
3//! is designed as part 
4//! of resource-bound
5//! crate
6//! and it is not designed to be used separately
7//! 
8
9pub trait StackOnly {}
10macro_rules! impl_stack_only {
11    ($($t:ty),*$(,)?) => {
12        $(impl StackOnly for $t{})*
13    };
14}
15
16
17impl_stack_only!(i8,i16,i32,i64,i128,&i8,&i16,&i32,&i64,&i128);//mark signed-integer     as    stack only     (non-heap)
18impl_stack_only!(isize);              //mark isize              as    stack only     (non-heap)
19impl_stack_only!(u8,u16,u32,u64,u128);//mark unsigned-integer   as    stack only     (non-heap)
20impl_stack_only!(usize);              //mark usize              as    stack only     (non-heap)
21impl_stack_only!(f32,f64);            //mark float              as    stack only     (non-heap)
22impl_stack_only!(bool);               //mark bool               as    stack only     (non-heap)
23impl_stack_only!(char);               //mark char               as    stack only     (non-heap)
24impl_stack_only!(());                 //mark ()                 as    stack only     (non-heap)