pub trait Acts<C>: Sized {
// Required methods
fn opts() -> Vec<&'static str>;
fn next_impl<'a>(
c: &C,
s: &mut ParseCtx<'a>,
a: &Arg<'a>,
args: &[Arg<'a>],
) -> Result<(), ErrActs>;
fn desc_act() -> &'static str;
fn usage_v() -> Vec<[&'static str; 2]>;
fn add_paths<'a>(pfx: &Vec<Arg<'a>>, p: &mut Vec<Vec<Arg<'a>>>);
// Provided methods
fn run(c: &C) -> Result<(), ErrActs> { ... }
fn next<'a>(
c: &C,
s: &mut ParseCtx<'a>,
args: &[Arg<'a>],
) -> Result<(), ErrActs> { ... }
fn list<'a>() -> Vec<Vec<Arg<'a>>> { ... }
fn usage() -> String { ... }
fn full_usage(exec: &str, pfx: &[&str]) -> String { ... }
}Required Methods§
fn opts() -> Vec<&'static str>
fn next_impl<'a>( c: &C, s: &mut ParseCtx<'a>, a: &Arg<'a>, args: &[Arg<'a>], ) -> Result<(), ErrActs>
fn desc_act() -> &'static str
fn usage_v() -> Vec<[&'static str; 2]>
fn add_paths<'a>(pfx: &Vec<Arg<'a>>, p: &mut Vec<Vec<Arg<'a>>>)
Provided Methods§
fn run(c: &C) -> Result<(), ErrActs>
fn next<'a>( c: &C, s: &mut ParseCtx<'a>, args: &[Arg<'a>], ) -> Result<(), ErrActs>
fn list<'a>() -> Vec<Vec<Arg<'a>>>
fn usage() -> String
fn full_usage(exec: &str, pfx: &[&str]) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".