We wrote a blog post about the Rust type-level programming part of the approach: https://blog.auxon.io/2019/10/25/type-level-registers/
https://doc.rust-lang.org/reference/items/generics.html#cons...
They came with 1.51: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html
https://aphyr.com/posts/342-typing-the-technical-interview
and related to Rust, the solution
https://github.com/insou22/typing-the-technical-interview-ru...
Or Typescript https://www.richard-towers.com/2023/03/11/typescripting-the-...
Here[1] is an example in C++ but given the article it seems you could do something similar in Rust.
[1]: https://github.com/tmolteno/template-fft/blob/master/fft_rea...
A simpler version is probably a simple non empty list where you always have the guaranty of at least one element.