 }
 
 /// A type-erased command.
-public struct AnyCommand<ClientError: ErrorType> {
+public struct CommandWrapper<ClientError: ErrorType> {
 	public let verb: String
 	public let function: String
 	


	/// Returns the command matching the given verb, or nil if no such command
	/// is registered.
	public subscript(verb: String) -> AnyCommand<ClientError>? {
		return commandsByVerb[verb]
	}
}


/// Maintains the list of commands available to run.
public final class CommandRegistry<ClientError: ErrorType> {
	private var commandsByVerb: [String: CommandWrapper<ClientError>] = [:]

	/// All available commands.
	public var commands: [CommandWrapper<ClientError>] {
		return commandsByVerb.values.sort { return $0.verb < $1.verb }
	}

