Trait TryInto

Source
pub trait TryInto<T> {
    type Error;

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

Required Associated Types§

Required Methods§

Source

fn try_into(v: Self) -> Result<T, Self::Error>

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>> TryInto<U> for T

Source§

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