pub trait Variant: Any + Sealed {
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
    fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
    fn type_name(&self) -> &'static str;
    fn clone_object(&self) -> Box<dyn Variant>;
}
Expand description

(internals) Trait to represent any type. Exported under the internals feature only.

This trait is sealed and cannot be implemented.

Currently, Variant is not Send nor Sync, so it can practically be any type. Turn on the sync feature to restrict it to only types that implement Send + Sync.

Required Methods

Convert this Variant trait object to &dyn Any.

Convert this Variant trait object to &mut dyn Any.

Convert this Variant trait object to Box<dyn Any>.

Get the name of this type.

Clone this Variant trait object.

Implementations

Is this Variant a specific type?

Implementors