pub trait FromUsizewhere
Self: Sealed,{
// Required method
fn from_usize(value: usize) -> Self;
}
Expand description
Trait for number types that can be converted from usize
, losslessly
Required Methods§
Sourcefn from_usize(value: usize) -> Self
fn from_usize(value: usize) -> Self
Convert from a usize
value
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.