Make number of nodes listed on index configurable

This commit is contained in:
Juno Takano 2025-12-17 02:21:31 -03:00
commit ab38e5ebde
3 changed files with 25 additions and 7 deletions

View file

@ -82,6 +82,10 @@ pub struct Config {
pub index_search: bool,
#[serde(default = "mktrue")]
pub index_node_list: bool,
#[serde(default = "mk8")]
pub index_node_count: u16,
#[serde(default = "mktrue")]
pub index_root_node: bool,
#[serde(default = "mktrue")]
pub tree_node_text: bool,
}
@ -90,6 +94,9 @@ pub struct Config {
fn mktrue() -> bool {
true
}
fn mk8() -> u16 {
8
}
impl Graph {
pub fn new(message: Option<String>) -> Graph {
@ -113,6 +120,8 @@ impl Graph {
raw_json: true,
index_search: true,
index_node_list: true,
index_node_count: 8,
index_root_node: true,
tree_node_text: true,
},
version: (0, 1, 0),