1
use serde::Deserialize;
2

            
3
#[derive(Debug, Deserialize)]
4
pub struct IncludeArgs {
5
  pub name: String,
6

            
7
  #[serde(default)]
8
  pub overwrite: bool,
9
}
10

            
11
#[derive(Debug, Deserialize)]
12
#[serde(untagged)]
13
pub enum Include {
14
  String(String),
15
  Include(Box<IncludeArgs>),
16
}
17

            
18
impl Include {
19
  pub fn capture(&self) -> anyhow::Result<()> {
20
    match self {
21
      Include::String(_) => self.capture_root(),
22
      Include::Include(args) => args.capture_root(),
23
    }
24
  }
25

            
26
  fn capture_root(&self) -> anyhow::Result<()> {
27
    unimplemented!()
28
  }
29
}
30

            
31
impl IncludeArgs {
32
  pub fn capture_root(&self) -> anyhow::Result<()> {
33
    unimplemented!()
34
  }
35
}