rstdev_config/values/string.rs
1use crate::types::SourceFormatter;
2
3/// `Value` is a main object that will be used as
4/// value type of `String`.
5///
6/// This object MUST implement [`SourceFormatter`]
7#[derive(Clone)]
8pub struct Value {
9 input: String,
10}
11
12impl Value {
13 pub fn new(input: String) -> Self {
14 Self { input }
15 }
16}
17
18impl<'a> SourceFormatter<'a, String> for Value {
19 fn get_source_value(&'a self) -> String {
20 self.input.clone()
21 }
22}