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