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.