pub fn rounded_enumerator(children: &dyn Children, index: usize) -> String
Expand description
Tree enumerator using rounded box-drawing characters for the last child.
Similar to the default enumerator, but uses a rounded corner character (╰──) for the last child instead of the standard corner (└──). This provides a softer, more modern aesthetic while maintaining the same tree structure.
§Arguments
children
- The children collection being enumeratedindex
- The zero-based index of the current child
§Returns
“├──” for intermediate children, “╰──” for the last child
§Output Example
├── Foo
├── Bar
├── Baz
╰── Qux
§Examples
use lipgloss_tree::{rounded_enumerator, new_string_data};
let children = new_string_data(&["Foo", "Bar", "Qux"]);
assert_eq!(rounded_enumerator(&children, 0), "├──"); // First child
assert_eq!(rounded_enumerator(&children, 1), "├──"); // Middle child
assert_eq!(rounded_enumerator(&children, 2), "╰──"); // Last child (rounded)