Skip to main content

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: &&'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§

Source

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

Source

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

Source

fn desc_act() -> &'static str

Source

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

Source

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

Provided Methods§

Source

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

Source

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

Source

fn list<'a>() -> Vec<Vec<&'a str>>

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§