bird_tool_utils_man/
environment.rs1#[derive(Debug, Clone)]
3pub struct Env {
4 pub(crate) name: String,
5 pub(crate) default: Option<String>,
6 pub(crate) help: Option<String>,
7}
8
9impl Env {
10 pub fn new(name: &str) -> Self {
12 Self {
13 name: name.into(),
14 default: None,
15 help: None,
16 }
17 }
18
19 pub fn default_value(mut self, default: &str) -> Self {
21 self.default = Some(default.into());
22 self
23 }
24
25 pub fn help(mut self, help: &str) -> Self {
27 self.help = Some(help.into());
28 self
29 }
30}