Is it possible to define various level for safety?
Rust Internals [Unofficial]
May 17, 2026
I guess if Rust were to allow this kind of functionality, it would need a dependently typed system. As of now, we don't have such a feature to enforce user-defined safety invariances, but there are several verification crates to eliminate logical errors at compile-time.
Discussion in the ATmosphere