mountain_mqtt/data/string_pair.rs
1#[derive(Debug, PartialEq, Copy, Clone)]
2pub struct StringPair<'a> {
3 name: &'a str,
4 value: &'a str,
5}
6
7impl<'a> StringPair<'a> {
8 pub fn new(name: &'a str, value: &'a str) -> Self {
9 Self { name, value }
10 }
11
12 pub fn name(&self) -> &'a str {
13 self.name
14 }
15
16 pub fn value(&self) -> &'a str {
17 self.value
18 }
19}