Dispatch
public struct Dispatch
Represents a tracking event or view to be dispatched.
-
The payload data of the dispatch.
Declaration
Swift
public internal(set) var payload: DataObject { get } -
The unique identifier of the dispatch.
Declaration
Swift
public let id: String -
The timestamp of when the dispatch was created, in Unix milliseconds.
Declaration
Swift
public let timestamp: Int64 -
Creates a new dispatch with the specified parameters.
Declaration
Swift
public init(name: String, type: DispatchType = .event, data: DataObject? = nil)Parameters
nameThe name of the event or view.
typeThe type of dispatch (event or view).
dataOptional additional data to include.
-
The name of this dispatch.
Declaration
Swift
public var name: String? { get } -
Enriches the dispatch with additional data.
Declaration
Swift
public mutating func enrich(data: DataObject) -
Replaces the current payload with a new one.
Declaration
Swift
public mutating func replace(payload: DataObject) -
Returns a short description suitable for logging.
Declaration
Swift
public func logDescription() -> StringReturn Value
A string containing the dispatch ID prefix and name.
View on GitHub