Trait freya_native_core::tree::TreeMut
source · pub trait TreeMut: TreeRef {
// Required methods
fn remove(&mut self, id: NodeId);
fn create_node(&mut self, id: NodeId);
fn add_child(&mut self, parent: NodeId, new: NodeId);
fn replace(&mut self, old_id: NodeId, new_id: NodeId);
fn insert_before(&mut self, old_id: NodeId, new_id: NodeId);
fn insert_after(&mut self, old_id: NodeId, new_id: NodeId);
fn create_subtree(
&mut self,
id: NodeId,
shadow_roots: Vec<NodeId>,
slot: Option<NodeId>
);
fn remove_subtree(&mut self, id: NodeId);
}
Expand description
A mutable view of a tree.
Required Methods§
sourcefn remove(&mut self, id: NodeId)
fn remove(&mut self, id: NodeId)
Removes the node and its children from the tree but do not delete the entities.
sourcefn create_node(&mut self, id: NodeId)
fn create_node(&mut self, id: NodeId)
Adds a new node to the tree.
sourcefn insert_before(&mut self, old_id: NodeId, new_id: NodeId)
fn insert_before(&mut self, old_id: NodeId, new_id: NodeId)
Inserts a node before another node.
sourcefn insert_after(&mut self, old_id: NodeId, new_id: NodeId)
fn insert_after(&mut self, old_id: NodeId, new_id: NodeId)
Inserts a node after another node.
sourcefn create_subtree(
&mut self,
id: NodeId,
shadow_roots: Vec<NodeId>,
slot: Option<NodeId>
)
fn create_subtree( &mut self, id: NodeId, shadow_roots: Vec<NodeId>, slot: Option<NodeId> )
Creates a new shadow tree.
sourcefn remove_subtree(&mut self, id: NodeId)
fn remove_subtree(&mut self, id: NodeId)
Remove any shadow tree.