pub trait NumCast<From> {
// Required method
fn num_cast_from(val: From) -> Self;
}
Expand description
A trait that represents potentially lossy numeric cast.
Is a drop-in replacement of as _
in a generic code.
Required Methods§
fn num_cast_from(val: From) -> Self
Object Safety§
This trait is not object safe.