pub trait TryAs<'a, T>: AsObject<'a> + TryInto<T, Error = Type>{
// Required method
fn try_as(self) -> Result<T, Type>;
}Expand description
An abstraction for fallible casting between object types.
Implement TryFrom<Self, Error = Type> instead of implementing this trait directly.
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.