pub struct FlatEntry<K: ItemKey = NodeId> {
pub node_id: K,
pub depth: usize,
pub has_children: bool,
pub is_expanded: bool,
}Expand description
A single entry in a tree’s flattened, currently-visible row list.
Generic over the key type so external sources carry their own identity
(K = NodeId for TreeModel-backed sources, K = i64 for an entity-id
store, …). The default K = NodeId keeps every in-tree FlatEntry mention
and entry.node_id read compiling unchanged.
Fields§
§node_id: KThe row’s stable key in its source.
depth: usizeDepth in the tree (0 for roots).
has_children: boolWhether this row has children in the source.
is_expanded: boolWhether this row is currently expanded (children visible).
Trait Implementations§
impl<K: Eq + ItemKey> Eq for FlatEntry<K>
Source§impl<K: PartialEq + ItemKey> PartialEq for FlatEntry<K>
impl<K: PartialEq + ItemKey> PartialEq for FlatEntry<K>
impl<K: PartialEq + ItemKey> StructuralPartialEq for FlatEntry<K>
Auto Trait Implementations§
impl<K> Freeze for FlatEntry<K>where
K: Freeze,
impl<K> RefUnwindSafe for FlatEntry<K>where
K: RefUnwindSafe,
impl<K> Send for FlatEntry<K>where
K: Send,
impl<K> Sync for FlatEntry<K>where
K: Sync,
impl<K> Unpin for FlatEntry<K>where
K: Unpin,
impl<K> UnsafeUnpin for FlatEntry<K>where
K: UnsafeUnpin,
impl<K> UnwindSafe for FlatEntry<K>where
K: UnwindSafe,
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