pub trait ExactFrom<T>: Sized {
// Required method
fn exact_from(value: T) -> Self;
}
Expand description
Converts a value from one type to another. If the conversion fails, the function panics.
It is recommended that this trait is not implemented directly; it is automatically implemented
when TryFrom
is implemented.
Required Methods§
fn exact_from(value: T) -> Self
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.