gl_client/lsps/lsps0/
schema.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Serialize, Deserialize)]
4pub struct ProtocolList {
5    pub protocols: Vec<u32>,
6}
7
8#[cfg(test)]
9
10
11mod test {
12
13		use super::*;
14		
15    #[test]
16    fn serialize_protocol_list() {
17        let protocols = ProtocolList {
18            protocols: vec![1, 3],
19        };
20
21
22        let json_str = serde_json::to_string(&protocols).unwrap();
23        assert_eq!(json_str, "{\"protocols\":[1,3]}")
24    }
25}