ElementClone

Trait ElementClone 

Source
pub trait ElementClone {
    // Required method
    fn clone_box(&self) -> Box<dyn Element>;
}
Expand description

A helper trait to make Element objects cloneable as trait objects.

Types that implement Element and Clone will automatically get an implementation of ElementClone which allows cloning boxed elements via clone_box.

Required Methods§

Source

fn clone_box(&self) -> Box<dyn Element>

Clone this element into a boxed trait object.

Implementors§

Source§

impl<T> ElementClone for T
where T: Element + Clone + 'static,