Trait CastInto

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

Performs some of the conversions that are available implicitly in C++.

CastInto is automatically implemented for all CastFrom conversions, similar to From and Into traits from std.

Required Methods§

Source

unsafe fn cast_into(self) -> T

Performs the conversion.

§Safety

This operation is safe as long as self is valid.

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: CastFrom<T>> CastInto<U> for T