Sample

struct Sample : Codable

The Statistic.Sample struct represents a single group of statistics, with the raw stats being made available via the metrics property.

  • The raw metrics for each email event type.

    Declaration

    Swift

    public let metrics: Statistic.Metric
  • The name of the sample, if applicable. For instance, if these are category stats, then this property will have the name of the category.

    Declaration

    Swift

    public let name: String?
  • The dimension type these stats have been grouped by.

    Declaration

    Swift

    public let type: Statistic.Dimension?
  • Initializes the struct.

    Declaration

    Swift

    public init(metrics: Statistic.Metric, name: String? = nil, type: Statistic.Dimension? = nil)

    Parameters

    metrics

    The raw metrics for each email event type.

    name

    The name of the sample (e.g. the name of the category).

    type

    The dimension type these stats have been grouped by.