pub trait CastFrom<T>: Sized {
// Required method
unsafe fn cast_from(value: T) -> Self;
}
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§
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.