pub trait NodeBase {
// Provided methods
fn id(&self) -> u32 { ... }
fn depth(&self) -> u32 { ... }
fn children(&self) -> Children<'_> ⓘ { ... }
fn name(&self) -> Option<String> { ... }
fn add_child(&mut self, node: &Node<'_>) -> Node<'_> { ... }
fn delete_child(&mut self, id: u32) { ... }
}
Expand description
Trait that is shared by both Node::Data
and Node::Directory
.
Provided Methods§
fn id(&self) -> u32
fn id(&self) -> u32
Integer that identifies the Type, Name, or Language ID of the entry
depending on its NodeBase::depth
in the tree
fn add_child(&mut self, node: &Node<'_>) -> Node<'_>
fn add_child(&mut self, node: &Node<'_>) -> Node<'_>
Add a new child node to the current and return the newly-added node
fn delete_child(&mut self, id: u32)
fn delete_child(&mut self, id: u32)
Delete the child node with the given id