CloneAny

Trait CloneAny 

Source
pub trait CloneAny:
    Any
    + Send
    + Sync {
    // Required methods
    fn clone_any(&self) -> Box<dyn CloneAny>;
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description

A trait that combines Any + Clone for value-based storage.

Required Methods§

Source

fn clone_any(&self) -> Box<dyn CloneAny>

Clone this value into a boxed trait object.

Source

fn as_any(&self) -> &dyn Any

Get a reference to the underlying Any.

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Get a mutable reference to the underlying Any.

Trait Implementations§

Source§

impl Clone for Box<dyn CloneAny>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

Source§

impl<T: Clone + Any + Send + Sync> CloneAny for T