pub trait TryFrom<T>where
T: View,
Self: View + Sized,
Self::V: SpecTryFrom<T::V>,{
type Error;
// Required method
exec fn ex_try_from(t: T) -> res : Result<Self, Self::Error>;
}Expand description
Vest equivalent of std::convert::TryFrom.
Required Associated Types§
Required Methods§
Sourceexec fn ex_try_from(t: T) -> res : Result<Self, Self::Error>
exec fn ex_try_from(t: T) -> res : Result<Self, Self::Error>
ensures
res matches Ok(
v,
) ==> {
&&& Self::V::spec_try_from(t@) is Ok
&&& Self::V::spec_try_from(t@) matches Ok(v_) && v@ == v_
},res matches Err(e) ==> Self::V::spec_try_from(t@) is Err,Vest equivalent of std::convert::TryFrom::try_from.
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.