diff options
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -12,6 +12,9 @@ pub struct CLI { #[structopt(short, long)] trace: bool, + #[structopt(short, long)] + port: Option<u16>, + #[structopt(parse(from_os_str))] configfile: Option<PathBuf>, @@ -23,6 +26,10 @@ impl CLI { pub fn cmd(&self) -> Option<&Command> { self.cmd.as_ref() } + + pub fn port(&self) -> Option<u16> { + self.port.as_ref().map(|p| *p) + } } #[derive(Debug, PartialEq, StructOpt)] |