CommandName

public protocol CommandName

Protocol for types that carry a command name used for dispatch routing.

Used as the Command generic constraint in CommandMappingsBuilder to allow type-safe command mapping without requiring RawRepresentable.

  • The name used to match and route this command during dispatch.

    Declaration

    Swift

    var commandName: String { get }

Available where Self: RawRepresentable, RawValue == String

  • commandName Default implementation

    Default Implementation

    Returns rawValue as the command name for String-backed RawRepresentable conformances.

    Declaration

    Swift

    var commandName: String { get }