[][src]Trait exonum::helpers::fabric::Command

pub trait Command {
    fn args(&self) -> Vec<Argument>;
fn name(&self) -> CommandName;
fn about(&self) -> &str;
fn execute(
        &self,
        commands: &HashMap<CommandName, CollectedCommand>,
        context: Context,
        exts: &dyn Fn(Context) -> Context
    ) -> Feedback; }

Command trait is used to create sub-command for NodeBuilder.

Required methods

fn args(&self) -> Vec<Argument>

List of command arguments.

fn name(&self) -> CommandName

Command name.

fn about(&self) -> &str

Short information about the command.

fn execute(
    &self,
    commands: &HashMap<CommandName, CollectedCommand>,
    context: Context,
    exts: &dyn Fn(Context) -> Context
) -> Feedback

Executes the command processing code.

Arguments:

  • commands - contains set of commands that can be performed on this node.
  • context - contains global execution context.
  • exts - allows to execute CommandExtensions for the command.
Loading content...

Implementors

impl Command for Finalize
[src]

impl Command for GenerateCommonConfig
[src]

impl Command for GenerateNodeConfig
[src]

impl Command for GenerateTestnet
[src]

impl Command for Maintenance
[src]

impl Command for Run
[src]

impl Command for RunDev
[src]

Loading content...