pub trait FromInt<I, A: Sealed> {
const NARROWING: bool;
// Required method
fn from_int(arch: A, value: I) -> Self;
}Expand description
Perform a potentially lossy conversion from a raw integer.
The associated constant NARROWING can be queried to check if the conversion is allowed
to narrow from the provided integer.
Narrowing conversions will only retain the lower bits.
Required Associated Constants§
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.