stb_parser/st_bridge/
stb_common.rs1use std::collections::HashMap;
2
3#[derive(Debug)]
4pub struct StbCommon {
5 pub stb_reinforcement_strength_list: StbReinforcementStrengthList,
6}
7
8impl StbCommon {
9 pub fn new() -> StbCommon {
10 let map = HashMap::new();
11 let stb_reinforcement_strength_list = StbReinforcementStrengthList { map };
12 StbCommon {
13 stb_reinforcement_strength_list,
14 }
15 }
16}
17
18#[derive(Debug)]
19pub struct StbReinforcementStrengthList {
20 map: HashMap<String, String>,
21}
22
23impl StbReinforcementStrengthList {
24 pub fn insert(&mut self, d: String, sd: String) {
25 self.map.insert(d, sd);
26 }
27
28 pub fn get(&self, d: String) -> Option<&String> {
29 self.map.get(&d)
30 }
31}
32
33