Trait formality_core::DowncastFrom
source · pub trait DowncastFrom<T>: Sized {
// Required method
fn downcast_from(t: &T) -> Option<Self>;
}
Expand description
Our version of “try-from”. A “downcast” casts from a more general type (e.g., any Parameter) to a more specific type (e.g., a type). This returns an Option because the value may not be an instance of the more specific type.
Required Methods§
fn downcast_from(t: &T) -> Option<Self>
Object Safety§
This trait is not object safe.