Trait BaseNodeTrait

Source
pub trait BaseNodeTrait:
    Any
    + Debug
    + Deref<Target = Base>
    + DerefMut
    + Send {
    // Required methods
    fn clone_box(&self) -> Node;
    fn as_any_ref(&self) -> &dyn Any;
    fn as_any_ref_mut(&mut self) -> &mut dyn Any;
}
Expand description

A set of useful methods that is possible to auto-implement.

Required Methods§

Source

fn clone_box(&self) -> Node

This method creates raw copy of a node, it should never be called in normal circumstances because internally nodes may (and most likely will) contain handles to other nodes. To correctly clone a node you have to use copy_node.

Source

fn as_any_ref(&self) -> &dyn Any

Casts self as Any

Source

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

Casts self as Any

Implementors§

Source§

impl<T> BaseNodeTrait for T
where T: Clone + NodeTrait + 'static,