Trait CastInto

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

Like Into but also support safe casts from/to usize and isize.

See CastFrom for more details.

Required Methods§

Source

fn cast_into(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§

Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,