Acts

Trait Acts 

Source
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§

Source

fn opts() -> Vec<&'static str>

Source

fn next_impl<'a>( c: &C, s: &mut ParseCtx<'a>, a: &Arg<'a>, args: &[Arg<'a>], ) -> Result<(), ActsErr<'a>>

Source

fn desc_act() -> &'static str

Source

fn usage_v() -> Vec<[&'static str; 2]>

Source

fn add_paths<'a>(pfx: &Vec<Arg<'a>>, p: &mut Vec<Vec<Arg<'a>>>)

Provided Methods§

Source

fn run(c: &C) -> Result<(), String>

Source

fn next<'a>( c: &C, s: &mut ParseCtx<'a>, args: &[Arg<'a>], ) -> Result<(), ActsErr<'a>>

Source

fn select_act<'a>() -> Result<&'static str, ActsErr<'a>>

Source

fn list<'a>() -> Vec<Vec<Arg<'a>>>

Source

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.

Implementors§