[][src]Trait leetcode_cli::cmds::Command

pub trait Command {
    fn usage<'a, 'c>() -> App<'a, 'c>;
fn handler(m: &ArgMatches) -> Result<(), Error>; }

Abstract commands' trait.

Required methods

fn usage<'a, 'c>() -> App<'a, 'c>

Usage of the spefic command

fn handler(m: &ArgMatches) -> Result<(), Error>

The handler will deal [args, options,...] from the command-line

Loading content...

Implementors

impl Command for DataCommand[src]

fn usage<'a, 'cache>() -> App<'a, 'cache>[src]

data command usage

fn handler(m: &ArgMatches) -> Result<(), Error>[src]

data handler

impl Command for EditCommand[src]

fn usage<'a, 'edit>() -> App<'a, 'edit>[src]

edit usage

fn handler(m: &ArgMatches) -> Result<(), Error>[src]

edit handler

impl Command for ExecCommand[src]

fn usage<'a, 'edit>() -> App<'a, 'edit>[src]

exec usage

fn handler(m: &ArgMatches) -> Result<(), Error>[src]

exec handler

impl Command for ListCommand[src]

implement Command trait for list

fn usage<'a, 'list>() -> App<'a, 'list>[src]

list command usage

fn handler(m: &ArgMatches) -> Result<(), Error>[src]

list command handler

List commands contains "-c", "-q", "-s" flags. + matches with -c will override the default keyword. + -qs

impl Command for PickCommand[src]

fn usage<'a, 'pick>() -> App<'a, 'pick>[src]

pick usage

fn handler(m: &ArgMatches) -> Result<(), Error>[src]

pick handler

impl Command for StatCommand[src]

fn usage<'a, 'stat>() -> App<'a, 'stat>[src]

stat usage

fn handler(_m: &ArgMatches) -> Result<(), Error>[src]

stat handler

impl Command for TestCommand[src]

fn usage<'a, 'edit>() -> App<'a, 'edit>[src]

test usage

fn handler(m: &ArgMatches) -> Result<(), Error>[src]

test handler

Loading content...