pub trait TryFrom<T>: Sized {
    type Error;

    fn try_from(_: T) -> Result<Self, Self::Error>;
}
Expand description

Attempt to construct Self via a conversion (borrowed from rust std)

This TryFrom trait is defined in the rust std library but is behind a feature gate. We place it here so that people using stable compilers can still use our crate. In the future, the std trait should be used.

Required Associated Types

The type returned in the event of a conversion error.

Required Methods

Performs the conversion.

Implementors