Type Definition tlist::Last

source ·
pub type Last<List> = <List as NonEmpty>::Last;
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!(Last<TList![U1, U2, U3]>, U3);

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