fpr_cli

Trait 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

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§