pub struct Tree { /* private fields */ }Implementations§
Source§impl Tree
impl Tree
pub fn new() -> Self
pub fn push( &mut self, parent: Option<NodeId>, name: impl Into<String>, is_container: bool, action: ActionValues, ) -> NodeId
pub fn push_with_detail( &mut self, parent: Option<NodeId>, name: impl Into<String>, detail: Option<String>, is_container: bool, action: ActionValues, ) -> NodeId
pub fn node(&self, id: NodeId) -> &Node
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn root_ids(&self) -> &[NodeId] ⓘ
Trait Implementations§
Source§impl TreeModel for Tree
impl TreeModel for Tree
Source§fn roots(&self) -> impl Iterator<Item = NodeId> + '_
fn roots(&self) -> impl Iterator<Item = NodeId> + '_
Returns forest roots in deterministic order.
Source§fn children(&self, id: NodeId) -> TreeChildren<'_, NodeId>
fn children(&self, id: NodeId) -> TreeChildren<'_, NodeId>
Returns the node’s child state and loaded children.
Source§fn revision(&self) -> TreeRevision
fn revision(&self) -> TreeRevision
Returns the revision of the model structure and display data.
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more