Trait brigadier_rs::Then

source ·
pub trait Then<E> {
    type Output;

    fn then(self, executor: E) -> Self::Output;
}
Expand description

Chaining extension trait for argument type parsers (CommandArgument).

Implementors of this trait need to specify a branching parser. There are two default branching parsers:

  • LiteralThen supports any parser that returns the unit type () as its argument type.
  • CommandThen supports any other parser (parsers that return any type).

It is generally sufficient to use one of these two types.

Note

Implementors should implement this type over any unbounded type E, type bounds for this type E should be put on the Output type instead.

Required Associated Types

Branching parser used by this type.

Required Methods

Returns the braching parser Self::Output initialized with self and a child argument.

See ThenWrapper.

Implementors