[][src]Trait string::TryFrom

pub trait TryFrom<T>: Sized + Sealed {
    type Error;
    fn try_from(value: T) -> Result<Self, Self::Error>;

Attempt to construct Self via a conversion.

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

Associated Types

type Error

The type returned in the event of a conversion error.

Loading content...

Required methods

fn try_from(value: T) -> Result<Self, Self::Error>

Performs the conversion.

Loading content...


impl<T> TryFrom<T> for String<T> where
    T: AsRef<[u8]> + StableAsRef

type Error = Utf8Error

Loading content...