Trait formality_core::DowncastTo
source · pub trait DowncastTo<T>: Sized {
// Required method
fn downcast_to(&self) -> Option<T>;
}
Expand description
Our version of “try-into”. A “downcast” casts from a more general type (e.g., any Parameter) to a more specific type (e.g., a type).
This is the trait that you prefer to implement,
but use DowncastFrom
in where-clauses.
Required Methods§
fn downcast_to(&self) -> Option<T>
Object Safety§
This trait is not object safe.