Trait string::TryFrom

source ·
pub trait TryFrom<T>: Sized + Sealed {
    type Error;

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

Attempt to construct Self via a conversion.

This trait will be deprecated in favor of std::convert::TryFrom once it reaches stable Rust.

Required Associated Types

The type returned in the event of a conversion error.

Required Methods

Performs the conversion.

Implementors