cursive-tree 0.0.9

Tree view for the Cursive TUI library
Documentation
use super::{
    super::{model::*, view::*},
    backend::*,
};

//
// SimpleTreeBackend
//

/// Simple tree view backend.
///
/// Nodes can only be populated manually.
pub struct SimpleTreeBackend;

impl SimpleTreeBackend {
    /// Create a tree view with this backend.
    pub fn tree_view() -> TreeView<Self> {
        Self::tree_model().into()
    }

    /// Create a tree model with this backend.
    pub fn tree_model() -> TreeModel<Self> {
        TreeModel::new(())
    }
}

impl TreeBackend for SimpleTreeBackend {
    type Context = ();
    type Error = ();
    type ID = ();
    type Data = ();
}