pub trait ToInt<T> {
// Required method
fn to_int() -> T;
}
Expand description
A type operator for taking a concrete integer value from a type.
It returns arbitrary integer value without explicitly specifying the type. It is useful when you pass the values to methods that accept distinct types without runtime casting.
Required Methods§
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.