pub trait CastUsize {
// Required methods
fn cast_to(self) -> usize;
fn cast_from(val: usize) -> Self;
}Expand description
Trait for casting between an unsigned integer to a usize, and vice versa. Note: to() would panic if the value is greater or equal to the type’s max.
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.