swh 0.2.1

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

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

const ALIAS_INDENT: &str = "\t\t";

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