pub trait Args<C>: Sized {
// Required methods
fn new<'a, 'b>(c: &C, args: &mut ParsedArgs<'b>) -> Result<Self, ErrArgs>;
fn desc_act() -> &'static str;
fn add_paths<'a>(pfx: &Vec<&'a str>, p: &mut Vec<Vec<&'a str>>);
fn add_usage(c: &C, r: &mut Vec<[String; 4]>);
fn default(c: &C) -> Self;
fn run(self, c: &C, r: Vec<&str>) -> Result<(), String>;
// Provided methods
fn next_impl<'a>(c: &C, args: &[&'a str]) -> Result<(), ErrArgs> { ... }
fn next<'a>(
c: &C,
_: &mut ParseCtx<'a>,
args: &[&'a str],
) -> Result<(), ErrArgs> { ... }
fn usage(c: &C) -> String { ... }
}Required Methods§
fn new<'a, 'b>(c: &C, args: &mut ParsedArgs<'b>) -> Result<Self, ErrArgs>
fn desc_act() -> &'static str
fn add_paths<'a>(pfx: &Vec<&'a str>, p: &mut Vec<Vec<&'a str>>)
fn add_usage(c: &C, r: &mut Vec<[String; 4]>)
fn default(c: &C) -> Self
fn run(self, c: &C, r: Vec<&str>) -> Result<(), String>
Provided Methods§
fn next_impl<'a>(c: &C, args: &[&'a str]) -> Result<(), ErrArgs>
fn next<'a>( c: &C, _: &mut ParseCtx<'a>, args: &[&'a str], ) -> Result<(), ErrArgs>
fn usage(c: &C) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.