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, Deinitable, Hashable, Movable

Methods

 

__init__

def __init__(out self, var parser: OptParser)

DetailsArgs:

  • parser (OptParser)
  • self (Self)

Returns:

Self

__eq__

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

DetailsArgs:

  • self (Self)
  • other (Self)

Returns:

Bool

__ne__

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

DetailsArgs:

  • self (Self)
  • other (Self)

Returns:

Bool

__hash__

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

DetailsParameters:

  • H (Hasher)

Args:

  • self (Self)
  • hasher (H)