Struct ptree::builder::TreeBuilder [−][src]
pub struct TreeBuilder { /* fields omitted */ }
A builder for a tree of StringItem
s
Methods
impl TreeBuilder
[src]
impl TreeBuilder
pub fn new(text: String) -> TreeBuilder
[src]
pub fn new(text: String) -> TreeBuilder
Start building a tree
The text
argument will be the top level item's text.
pub fn begin_child(&mut self, text: String) -> &mut Self
[src]
pub fn begin_child(&mut self, text: String) -> &mut Self
Add a child to the current item and make the new child current
pub fn end_child(&mut self) -> &mut Self
[src]
pub fn end_child(&mut self) -> &mut Self
Finish adding children, and make the current item's parent current
pub fn add_empty_child(&mut self, text: String) -> &mut Self
[src]
pub fn add_empty_child(&mut self, text: String) -> &mut Self
Add an empty child (leaf item) to the current item
pub fn build(&mut self) -> StringItem
[src]
pub fn build(&mut self) -> StringItem
Finish building the tree and return the top level item
Auto Trait Implementations
impl Send for TreeBuilder
impl Send for TreeBuilder
impl Sync for TreeBuilder
impl Sync for TreeBuilder