Struct ptree::item::StringItem
source · pub struct StringItem {
pub text: String,
pub children: Vec<StringItem>,
}
Expand description
A simple concrete implementation of TreeItem
using String
s
While a tree of StringItem
s can be constructed directly,
it is usually easier to use a TreeBuilder
.
Fields§
§text: String
The item’s own text, to be returned by write_self
children: Vec<StringItem>
The list of item’s children
Trait Implementations§
source§impl Clone for StringItem
impl Clone for StringItem
source§fn clone(&self) -> StringItem
fn clone(&self) -> StringItem
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StringItem
impl Debug for StringItem
Auto Trait Implementations§
impl Freeze for StringItem
impl RefUnwindSafe for StringItem
impl Send for StringItem
impl Sync for StringItem
impl Unpin for StringItem
impl UnwindSafe for StringItem
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)