Trait ExactFrom

Source
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§

Source

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.

Implementors§

Source§

impl<T, U: TryFrom<T>> ExactFrom<T> for U