pub trait AnyValue: AnyValueTypeless {
// Required method
fn value_typeid(&self) -> TypeId;
// Provided methods
fn downcast_ref<T: 'static>(&self) -> Option<&T> { ... }
fn downcast<T: 'static>(self) -> Option<T>
where Self: Sized { ... }
}
Expand description
Type erased value interface.
Know it’s type and size, possibly compile-time.
Required Methods§
fn value_typeid(&self) -> TypeId
Provided Methods§
fn downcast_ref<T: 'static>(&self) -> Option<&T>
fn downcast<T: 'static>(self) -> Option<T>where
Self: Sized,
Object Safety§
This trait is not object safe.