Struct lapp::Args
[−]
[src]
pub struct Args<'a> { /* fields omitted */ }
Methods
impl<'a> Args<'a>
[src]
fn new(text: &'a str) -> Args
provide a usage string from which we extract flag definitions
fn quit(&self, msg: &str) -> !
bail out of program with non-zero return code. May force this to panic instead with the EASY_DONT_QUIT_PANIC environment variable.
fn declarations(&mut self, struct_name: &str) -> String
create suggested variable or struct declarations for accessing the flags...
fn dump(&mut self)
fn get_string(&self, name: &str) -> String
get flag as a string, quitting otherwise.
fn get_integer(&self, name: &str) -> i32
get flag as an integer, quitting otherwise.
fn get_float(&self, name: &str) -> f32
get flag as a float, quitting otherwise.
fn get_bool(&self, name: &str) -> bool
get flag as a bool, quitting otherwise.
fn get_infile(&self, name: &str) -> Box<Read>
get flag as a file for reading, quitting otherwise.
fn get_outfile(&self, name: &str) -> Box<Write>
get flag as a file for writing, quitting otherwise.
fn get_strings(&self, name: &str) -> Vec<String>
get multiple flag as an array of strings, quitting otherwise.
fn get_integers(&self, name: &str) -> Vec<i32>
get multiple flag as an array of integers, quitting otherwise.
fn get_floats(&self, name: &str) -> Vec<f32>
get multiple flag as an array of floats, quitting otherwise.