CommandMiddlewareComposer<O extends OptionDefinition, T> class

Convenience class for easier type binding of MiddlewareComposer for commands.

Inheritance

Constructors

CommandMiddlewareComposer({OnRun<CommandContext<O, T>>? onRun, OnReturn<T?, CommandContext<O, T>>? onReturn, OnError<T?, CommandContext<O, T>>? onError, OnFinally<CommandContext<O, T>>? onFinally})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

middleware(Handler<FutureOr<T?>, CommandContext<O, T>> next) → Handler<FutureOr<T?>, CommandContext<O, T>>
Middleware method that produces the handler that runs these hooks. Adheres to the Middleware signature.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(Object error, StackTrace stackTrace, CommandContext<O, T> arg) → FutureOr<T?>
Hook method that is called if the next handler throws.
inherited
onFinally(CommandContext<O, T> arg) → FutureOr<void>
Hook method that is called after the next handler returns or throws, after the onReturn / onError hook has run.
inherited
onReturn(CommandContext<O, T> arg, T? response) → FutureOr<T?>
Hook method that is called after the next handler returns normally.
inherited
onRun(CommandContext<O, T> arg) → FutureOr<CommandContext<O, T>>
Hook method that is called before the next handler is run.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited