Trait TryInto

Source
pub trait TryInto<T>: Sized + View
where T: View, Self::V: SpecTryInto<<T as View>::V>,
{ type Error; // Required method fn ex_try_into(self) -> Result<T, Self::Error>; }
Expand description

Vest equivalent of std::convert::TryInto.

Required Associated Types§

Source

type Error

The type returned in the event of a conversion error.

Required Methods§

Source

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

Vest equivalent of std::convert::TryInto::try_into.

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 T: View, U: View + TryFrom<T>, <U as View>::V: SpecTryFrom<<T as View>::V>,

Source§

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