Trait MaybeTryInto

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

    // Required method
    fn maybe_try_into(self) -> NullableResult<T, Self::Error>;
}
Expand description

Analogue of TryInto that returns a NullableResult

Required Associated Types§

Source

type Error

The type that is returned if conversion fails

Required Methods§

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: MaybeTryFrom<T>> MaybeTryInto<U> for T

Source§

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