HashableKeyPathConsumer

public protocol HashableKeyPathConsumer

A protocol that defines a function that can be used to add key paths from the Root type to Hashable properties.

  • The type of the object that will be hashed.

    Declaration

    Swift

    associatedtype Root
  • Add the provided key path to the collection of key paths that will be used to calculate the hash of an instance of Root.

    Declaration

    Swift

    mutating func addHashableKeyPath<KeyType>(_ keyPath: KeyPath<Root, KeyType>) where KeyType : Hashable

    Parameters

    keyPath

    The key to include when hashing.

  • Declaration

    Swift

    mutating func addCustomEquator<KeyType>(forKeyPath keyPath: KeyPath<Root, KeyType>, equator: @escaping (KeyType, KeyType) -> Bool) where KeyType : Hashable