Trait CastInto

Source
pub trait CastInto<T: Copy>: Copy {
    // Required method
    fn cast(self) -> T;
}
Expand description

Trait to express (possibly lossy) casting of integers

Required Methods§

Source

fn cast(self) -> T

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.

Implementors§