Expand description
This module defines a cons list for types, CTCons.
The cons list can be queried and the result is calculated at compile time.
See CTSized and CTOffset for more information about querying the cons list.
§Example
extern crate ct_utils;
use ct_utils::prelude::*;
use ct_utils::ct_cons::Cons;
fn main() {
type ExampleOne = Cons<Cons<Cons<CTConsTerm, u8>, u32>, u64>;
//
type ExampleTwo = <<CTConsTerm as CTAppend<u8>>::Output as CTAppend<u32>>::Output;
}Structs§
- Cons
- Actual type used to carry cons list information.
Enums§
- CTCons
Term - Termination type for
Cons.
Traits§
- CTAppend
- Trait used to append items to compile time structure.
- CTCons
- Represents a cons list where each new addition builds further onto the previous list.
The previous list is at
CTCons::TailandCTConsTermis used as bootstrapper to create the initial tail. The latest item is atCTCons::Head. - CTIf
Offset - Specialized implementation of
IfCheckto accomodate for the additional constraints necessary on [CTIf::Path]. - CTOffset
- Trait used to calculate the 0-indexed offset of a specific type item within compile time structures.
- CTOffset
Ext - Trait used to calculate the offset of a specific type without upcasting to the
CTOffsettrait. - CTSized
- Trait used to measure the amount of items within compile time structures.
Type Aliases§
- CTCons
Offset Invalid - This value is returned when querying
CTOffsetand the requested type is not found within the subjectCTCons.