///|
/// The connections that get a call from the hub. A target is a plain value, so
/// a test can compare it (signalr-hubs, "Addressing").
#derive(Eq, Debug)
pub(all) enum Target {
  /// Every connection of the hub.
  All
  /// The connection that made the current call.
  Caller(@signalr.ConnectionId)
  /// Every connection except the one that made the current call.
  Others(@signalr.ConnectionId)
  Connections(ReadOnlyArray[@signalr.ConnectionId])
  AllExcept(ReadOnlyArray[@signalr.ConnectionId])
  Groups(ReadOnlyArray[@signalr.GroupName])
  GroupExcept(@signalr.GroupName, ReadOnlyArray[@signalr.ConnectionId])
  /// The connections of a group except the one that made the current call.
  OthersInGroup(@signalr.GroupName, @signalr.ConnectionId)
  /// Each connection whose identity has one of the user IDs.
  Users(ReadOnlyArray[@signalr.UserId])
}

///|
pub extend Target with Eq::{equal, not_equal}

///|
pub extend Target with @debug.Debug::{to_repr}