Collector

public protocol Collector<T> : Action, Identifiable

Protocol representing a Collector. It is a generic protocol that defines the structure for creating different types of collectors. It inherits from the Action protocol and conforms to Identifiable and Sendable protocols.

Parameters

T

The type of the payload that the collector will handle.

id

A unique identifier for the collector.

payload()

Returns the payload of type T. When payload returns nil, the field will not be posted to server.

  • T

    Declaration

    Swift

    associatedtype T
  • id

    Declaration

    Swift

    var id: String { get }
  • Declaration

    Swift

    init(with json: [String : Any])
  • Declaration

    Swift

    func initialize(with value: Any)
  • Declaration

    Swift

    func payload() -> T?