Trait FromConst
Source pub trait FromConst<const V: i128>: Sized {
const VALUE: Self;
}
Expand description
Types that can be created from an integer constant expression validated at compile time.
Implement this trait to make a type usable with cv!. Use the cv! macro, not this trait
directly, for creating values.
The value that corresponds to the constant V.
Fails the build if V is not a valid value for Self.
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".