Expand description
An interactive, model-agnostic Ratatui tree table.
TreeModel borrows a rooted acyclic graph from application-owned data, TreeQuery
describes filtering and sorting, and TreeListViewState owns stable UI state plus the derived
TreeProjection cache. TreeListView uses that same projection for viewport-only
rendering, ensuring input and display always agree.
The model API supports stable generic IDs, multiple roots, asynchronous child states, and explicit revisions. The view adds typed actions and intents, validated dynamic columns, two-dimensional scrolling, tri-state marks, snapshots, and hit testing.
Feature flags:
keymap: crossterm-based key bindings andTreeListViewState::handle_key*helpers.serde: serde support forTreeListViewSnapshot.
Modules§
Structs§
- Column
Def - A column definition. Exactly one column in a set must have the tree role.
- Column
Width - A validated width range satisfying
min <= ideal <= max. - Indexed
Tree - A validated zero-copy adapter over an indexed adjacency list.
- NoFilter
- A filter that matches every node.
- NoSort
- No sorting; preserves model order.
- Projected
Node - A node in the flat visible tree projection.
- Tree
Change Set - The exact model changes needed to reconcile widget state.
- Tree
Column Set - A dynamic column set parsed and validated once at construction.
- Tree
Glyphs - Glyphs for tree structure and lazy-loading states.
- Tree
Label Prefix - A node name with an optional leading icon.
- Tree
List View - A stateful tree table built around one projection shared by rendering and navigation.
- Tree
List View Snapshot - The serializable persistent part of view state.
- Tree
List View State - Persistent view state and its derived caches.
- Tree
List View Style - Visual tree configuration.
- Tree
Model Ref - A zero-copy adapter over roots and a child accessor for arbitrary storage.
- Tree
Projection - A cached flat projection shared by navigation and rendering.
- Tree
Query - A complete query for building the visible projection.
- Tree
Revision - A monotonically increasing revision of model, filter, or sorting data.
- Tree
RowContext - Context for rendering one tree row.
- Tree
RowNode State - Node state available to row renderers.
- Tree
RowRender State - View state available to row renderers.
Enums§
- Column
Width Error - An error produced while constructing a valid column width.
- Indexed
Tree Error - An error produced while parsing an indexed tree.
- Tree
Action - An action produced by the application or user.
- Tree
Children - The state of a node’s child list.
- Tree
Columns Error - An error produced while parsing a column set.
- Tree
Edit Action - High-level editing actions for the selected node.
- Tree
Edit Command - An atomic model editing command.
- Tree
Edit Request - A typed edit request enriched with the current selection.
- Tree
Event - The result of handling an action.
- Tree
Expansion State - A node’s effective expansion state in the current projection.
- Tree
Filter Config - Tree filtering configuration.
- TreeHit
- A hit-test result for the most recently rendered layout.
- Tree
HitRegion - The region of the latest rendering that contains a coordinate.
- Tree
Horizontal Scroll - Horizontal layout policy.
- Tree
Insert Position - An insertion position within a child list.
- Tree
Intent - An intent that must be handled by the application.
- Tree
Mark State - A node’s aggregated mark state.
- Tree
Match State - A node’s role in a filtered projection.
- Tree
Root Visibility - Controls how roots are projected.
- Tree
RowRendering - Strategy for building table rows.
- Tree
Scroll Policy - Policy for keeping the selection in the vertical viewport.
- Tree
Selection Fallback - Selection policy used when the selected node disappears from the projection.
- Tree
Selection Update - A selection update after a successful edit.
- Tree
View Action - Actions that only change view state.
Traits§
- Tree
Cell Renderer - Renders an additional cell with full row context.
- Tree
Columns - Lays out columns and builds every cell in a row.
- Tree
Editor - Applies typed editing commands to a domain model.
- Tree
Filter - A node visibility filter.
- Tree
Label Provider - A simplified provider for node names and icons.
- Tree
Label Renderer - A complete renderer for the primary tree cell.
- Tree
Model - Минимальный контракт источника дерева, леса или корневого ациклического графа.
- Tree
Sort - A policy for sorting sibling nodes.
Functions§
- distribute_
widths - Distributes width as evenly as possible between
min,ideal, andmax. - tree_
label_ line - Builds the primary cell contents, including guides and branch state.
- tree_
name_ cell - Wraps
tree_label_linein a table cell.