Type Definition tlist::Inits

source ·
pub type Inits<List> = <List as NonEmpty>::Inits;
Expand description

Type-level ‘function’ to return the all elements but the last element of a TList

Only implemented for non-empty TLists.

use tlist::*;
use typenum::consts::{U1, U2, U3};
use static_assertions::assert_type_eq_all as assert_type_eq;

assert_type_eq!(Inits<TList![U1, U2, U3]>, TList![U1, U2]);

assert_type_eq!(Inits<TList![i8, usize, i32, u64]>, TList![i8, usize, i32]);