pub trait CastFrom<Input> {
// Required method
fn cast_from(input: Input) -> Self;
}Expand description
A trait that allows to generically cast one type from another.
This type is similar to the std::convert::From trait, but the conversion between the two
types is deferred to the individual as casting. If in doubt about the semantics of such a
casting, refer to
the rust reference.
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.