cita_extra_util/
node.rs

1
2#[derive(Debug, Clone, Copy, Eq, PartialEq)]
3pub enum NodeType {
4    Archive,
5    Full,
6    Light,
7}
8
9impl From<&str> for NodeType {
10    fn from(journaldb_type: &str) -> Self {
11        match journaldb_type {
12            "archive" => NodeType::Archive,
13            "full" => NodeType::Full,
14            "light" => NodeType::Light,
15            str => panic!("input archive or full, your input: {}", str),
16        }
17    }
18}
19