Trait fpr_cli::Acts

source ·
pub trait Acts<C>: Sized {
    // Required methods
    fn opts() -> Vec<&'static str>;
    fn next_impl(
        c: &C,
        s: &mut ParseCtx,
        a: &Arg,
        args: &[Arg],
    ) -> Result<(), ActsErr>;
    fn desc_act() -> &'static str;
    fn usage_v() -> Vec<[&'static str; 2]>;
    fn add_paths(pfx: &Vec<String>, p: &mut Vec<Vec<String>>);

    // Provided methods
    fn run(c: &C) -> Result<(), String> { ... }
    fn next(c: &C, s: &mut ParseCtx, args: &[Arg]) -> Result<(), ActsErr> { ... }
    fn select_act() -> Result<&'static str, ActsErr> { ... }
    fn list() -> Vec<Vec<String>> { ... }
    fn usage() -> String { ... }
}

Required Methods§

source

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

source

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

source

fn desc_act() -> &'static str

source

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

source

fn add_paths(pfx: &Vec<String>, p: &mut Vec<Vec<String>>)

Provided Methods§

source

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

source

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

source

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

source

fn list() -> Vec<Vec<String>>

source

fn usage() -> String

Object Safety§

This trait is not object safe.

Implementors§