DittoCollectionsEvent

public struct DittoCollectionsEvent
extension DittoCollectionsEvent: CustomStringConvertible, CustomDebugStringConvertible

Provides information about the changes that have occurred in relation to an event delivered when observing the collections in a DittoStore. It contains information about the collections that are known about as well as the collections that were previously known about in the previous event, along with information about what collections have been inserted, deleted, updated, or moved since the last event.

  • Indicates whether or not this is the first event to be delivered when observing collections in the store.

    Declaration

    Swift

    public let isInitial: Bool
  • A list of all of the known collections.

    Declaration

    Swift

    public let collections: [DittoCollection]
  • A list of all of the known collections at the time the previous event was delivered.

    Declaration

    Swift

    public let oldCollections: [DittoCollection]
  • A list of the indexes in the list of currently known about collections at which new collections have been inserted.

    Declaration

    Swift

    public let insertions: [Int]
  • A list of the indexes in the list of previously known about collections at which collections have been removed.

    Declaration

    Swift

    public let deletions: [Int]
  • A list of the indexes in the list of currently known about collections at which pre-existing collections have been updated.

    Declaration

    Swift

    public let updates: [Int]
  • A list of the tuples that provides the indexes, in relation to the list of previously known about collections, that already known about collections have moved from and the indexes, in relation to the list of currently known about collections, that the collections have moved to.

    Declaration

    Swift

    public let moves: [(from: Int, to: Int)]
  • Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public var debugDescription: String { get }