cli
Subcommand

Subcommand

Mojo struct 🡭

Subcommand

@memory_only
struct Subcommand

A subcommand.

The name of the subcommand is the OptParser.name. The name of the subcommand will be checked against the first value in the input args. The help message will display the program description for the OptParser that is associated with this subcommand.

Fields

  • parser (OptParser)

Implemented traits

AnyType, Copyable, ExplicitlyCopyable, Hashable, Movable, UnknownDestructibility

Methods

 

__init__

fn __init__(out self, var parser: OptParser)

Details Args:

  • parser (OptParser)
  • self (Self)

Returns:

Self

__eq__

fn __eq__(self, other: Self) -> Bool

Details Args:

  • self (Self)
  • other (Self)

Returns:

Bool

__ne__

fn __ne__(self, other: Self) -> Bool

Details Args:

  • self (Self)
  • other (Self)

Returns:

Bool

__hash__

fn __hash__[H: Hasher](self, mut hasher: H)

Details Parameters:

  • H (Hasher)

Args:

  • self (Self)
  • hasher (H)