Struct kern::Command [−][src]
pub struct Command<'a> { /* fields omitted */ }Expand description
Command represents a command parsed from the command-line Use CliBuilder to build a parsed Command
Example
use kern::CliBuilder;
use std::env;
let args: Vec<String> = env::args().collect();
let command = CliBuilder::new().options(&["option"]).build(&args);
assert_eq!(command.command().contains("rustdoctest"), true);Implementations
Get all parameters
Get specific parameter or default
Get specific parameter or default as &str
Get argument at specific index or default
Get argument at specific index or default as &str
👎 Deprecated
👎 Deprecated
Create a new Command from raw command line arguments without options
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Command<'a>
impl<'a> UnwindSafe for Command<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
