pub fn getopts(args: &[~str], opts: &[Opt]) -> Result
Parse command line arguments according to the provided options.
On success returns Ok(Opt)
. Use methods such as opt_present
opt_str
, etc. to interrogate results. Returns Err(Fail_)
on failure.
Use to_err_msg
to get an error message.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).