pub trait Cast<T: Sized = Self> {
// Required method
fn cast(&self) -> Result<T>;
}Expand description
Unary operator for casting values of one type to another.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".