Trait brigadier_rs::Then
source · 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
Required Methods
sourcefn then(self, executor: E) -> Self::Output
fn then(self, executor: E) -> Self::Output
Returns the braching parser Self::Output initialized with self
and a
child argument.
See ThenWrapper
.