pub trait ReturnTypeReflection: Sized {
// Required methods
fn accepts_type(ty: &Type) -> bool;
fn type_hint() -> &'static str;
}
Expand description
A type to emulate dynamic typing across compilation units for static types.
Required Methods§
Sourcefn accepts_type(ty: &Type) -> bool
fn accepts_type(ty: &Type) -> bool
Returns true if this specified type can be stored in an instance Self
.
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.