rstdev_config/values/
tuple.rs

1use crate::types::SourceFormatter;
2
3/// `Value` is a main object used to store a collection tuple
4/// of `String`
5///
6/// This object MUST implement [`SourceFormatter`]
7#[derive(Debug)]
8pub struct Value {
9    input: Vec<(String, String)>,
10}
11
12impl Value {
13    pub fn new(input: Vec<(String, String)>) -> Self {
14        Self { input }
15    }
16}
17
18impl<'a> SourceFormatter<'a, Vec<(String, String)>> for Value {
19    fn get_source_value(&'a self) -> Vec<(String, String)> {
20        self.input.to_owned()
21    }
22}