Command
public protocol Command
Since we cannot extend or inherit Enums, this protocol
serves as the base for all commands. The State reducer State(S) * Event(E) → Action (A), State (S’)
accepts an Event and emits this Command as action or state change.
-
command()Default implementationSelfas CommandDefault Implementation
Selfas CommandDeclaration
Swift
func command() -> Self