pub trait CTSized {
type Size: Unsigned;
// Required method
fn size() -> usize;
}Expand description
Trait used to measure the amount of items within compile time structures.
Cast the structure as CTSized. If this trait is implemented, you can query the
size from CTSized::Size.
Alternatively a value can be constructed from the type representing the size, just
call CTSized::size.
§Example
let size = <Cons<Cons<Cons<CTConsTerm, u8>, u32>, u64> as CTSized>::size();
assert_eq!(size, 3);Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.