pub trait NonEmpty: TList + Sealed {
type First;
type Rest: TList;
type Last;
type Inits: TList;
}Expand description
Non-empty TLists.
Any TList except TNil implements this constraining trait.
(In other words: Any TCons<H, T>, regardless of what H or T it contains, implements it.)
Quite a number of operations are only defined for non-empty TLists, so this constraint is used a lot in the library itself as well.
See also TList::IS_EMPTY and IsEmpty if you want work with both Empty and NonEmpty lists generically.
Required Associated Types§
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.