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<(), ActsErr<'a>>;
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<(), String> { ... }
fn next<'a>(
c: &C,
s: &mut ParseCtx<'a>,
args: &[Arg<'a>],
) -> Result<(), ActsErr<'a>> { ... }
fn select_act<'a>() -> Result<&'static str, ActsErr<'a>> { ... }
fn list<'a>() -> Vec<Vec<Arg<'a>>> { ... }
fn usage() -> 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<(), ActsErr<'a>>
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<(), String>
fn next<'a>( c: &C, s: &mut ParseCtx<'a>, args: &[Arg<'a>], ) -> Result<(), ActsErr<'a>>
fn select_act<'a>() -> Result<&'static str, ActsErr<'a>>
fn list<'a>() -> Vec<Vec<Arg<'a>>>
fn usage() -> 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.