[−][src]Struct ptree::builder::TreeBuilder
A builder for a tree of StringItem
s
Implementations
impl TreeBuilder
[src]
pub fn new(text: String) -> TreeBuilder
[src]
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]
Add a child to the current item and make the new child current
pub fn end_child(&mut self) -> &mut Self
[src]
Finish adding children, and make the current item's parent current
pub fn add_empty_child(&mut self, text: String) -> &mut Self
[src]
Add an empty child (leaf item) to the current item
pub fn build(&mut self) -> StringItem
[src]
Finish building the tree and return the top level item
Auto Trait Implementations
impl RefUnwindSafe for TreeBuilder
[src]
impl Send for TreeBuilder
[src]
impl Sync for TreeBuilder
[src]
impl Unpin for TreeBuilder
[src]
impl UnwindSafe for TreeBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,