Trait TryInto

Source
pub trait TryInto<T>: Sized {
    type Err;

    // Required method
    fn try_into(self) -> Result<T, Self::Err>;
}

Required Associated Types§

Required Methods§

Source

fn try_into(self) -> Result<T, Self::Err>

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> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Err = <U as TryFrom<T>>::Err