Skip to main content

Module node

Module node 

Source
Expand description

The recursive node value making up the in-memory tree.

Invariants (upheld by crate::DirectoryTree transitions, asserted by the test suite):

  1. is_expandedis_dir — files are never expanded.
  2. is_expanded and is_loaded are independent: a node may be loaded-but-collapsed, or briefly expanded-but-not-loaded while a scan is in flight.
  3. children is empty iff !is_loaded, except for genuinely empty (or fully filtered) directories, which are loaded with no children.
  4. error.is_some()is_loadedchildren empty.

Nodes are ephemeral: rebuilt when filters change or fresh scan data merges. Anything that must survive rebuilds (the selection set, from RFC 004 on) lives on the tree root keyed by path, never on nodes.

Structs§

TreeNode
One directory entry in the tree.