From 0d6f2b9500039685ff9b006e5cac7dfb3bb30e4f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 29 Dec 2015 16:45:14 +0100 Subject: [PATCH] cli.rs: Add documentation to functions --- src/cli.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index 3b1d8b4b..ee62a7b1 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -28,18 +28,32 @@ impl<'a> CliConfig<'a> { } } + /** + * Check whether the CLI says we should run verbose + */ pub fn is_verbose(&self) -> bool { self.cli_matches.is_present("verbose") || self.is_debugging() } + /** + * Check whether the CLI says we should run in debugging + */ pub fn is_debugging(&self) -> bool { self.cli_matches.is_present("debug") } + /** + * Get the runtime path the CLI configured + */ pub fn get_rtp(&self) -> Option { self.cli_matches.value_of("rtp").and_then(|s| Some(String::from(s))) } + /** + * Get the store path the CLI configured + * + * TODO: Implement properly. Not working by now. + */ pub fn store_path(&self) -> Option { self.get_rtp().and_then(|rtp| { self.cli_matches