Add counting of detached nodes
This commit is contained in:
parent
6feb20d3da
commit
41a5994bbd
7 changed files with 109 additions and 18 deletions
|
|
@ -23,6 +23,15 @@ pub struct Node {
|
|||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub connections: Option<HashMap<String, Edge>>,
|
||||
|
||||
#[serde(default)]
|
||||
pub stats: Stats,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Default, Eq, PartialEq, Debug)]
|
||||
pub struct Stats {
|
||||
pub outgoing: u32,
|
||||
pub incoming: u32,
|
||||
}
|
||||
|
||||
impl Node {
|
||||
|
|
@ -39,6 +48,7 @@ impl Node {
|
|||
redirect: String::default(),
|
||||
hidden: false,
|
||||
summary: String::default(),
|
||||
stats: Stats::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue