swh 0.2.1

A CLI for Switch Hosts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::fmt;
use std::fmt::Formatter;

#[derive(knuffel::Decode, Debug, Clone)]
pub struct Include {
    #[knuffel(argument)]
    pub name: String,
}

impl fmt::Display for Include {
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
        f.write_str(format!("include \"{}\"\n", self.name).as_str())
    }
}