BinUpdateResult

public struct BinUpdateResult<Backstorage> where Backstorage : Collection

Struct that contains updated storage and changes applied to it

Example:

struct AnyModel {
    // any implementation
}

let result: BinUpdateResult<[AnyModel]> = // returned by a function
// result.bin is a type of [AnyModel]
// result.changes is a type of CollectionChanges<[Int]>

  • bin

    Any type that conforms to Collection

    Declaration

    Swift

    public let bin: Backstorage
  • CollectionChanges where element is an array of Index type that used by the Backstorage

    Let’s say we have a model AnyModel and the storage is Array<AnyModel> then changes will be a type of CollectionChanges<[Int]> since Int is an index of Array<AnyModel>

    Declaration

    Swift

    public let changes: CollectionChanges<[Backstorage.Index]>