pub trait AsCast: AsPrimitive {
// Required method
fn as_cast<N: AsPrimitive>(n: N) -> Self;
}
Expand description
An interface for casting between machine scalars.
Required Methods§
Sourcefn as_cast<N: AsPrimitive>(n: N) -> Self
fn as_cast<N: AsPrimitive>(n: N) -> Self
Creates a number from another value that can be converted into
a primitive via the AsPrimitive
trait.
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.