SpecTryInto

Trait SpecTryInto 

Source
pub trait SpecTryInto<T>: Sized {
    type Error;

    // Required method
    spec fn spec_try_into(self) -> Result<T, Self::Error>;
}
Expand description

Spec version of TryInto.

Required Associated Types§

Source

type Error

The type returned in the event of a conversion error.

Required Methods§

Source

spec fn spec_try_into(self) -> Result<T, Self::Error>

Performs the conversion.

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> SpecTryInto<U> for T
where U: SpecTryFrom<T>,

Source§

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