EquatableKeyPathConsumer
public protocol EquatableKeyPathConsumer
A protocol that defines a function that can be used to add key paths from the Root
type to Equatable
properties.
-
The root type of the object that will be equated.
Declaration
Swift
associatedtype Root
-
Add the provided key path to the collection of key paths that will be used to equate 2 instances of
Root
.Declaration
Swift
mutating func addEquatableKeyPath<KeyType>(_ keyPath: KeyPath<Root, KeyType>) where KeyType : Equatable
Parameters
keyPath
The key to include when equating 2 instances of
Root
. -
Add the provided key path to the collection of key paths that will be used to equate 2 instances of
Root
.Declaration
Swift
mutating func addCustomEquator<KeyType>(forKeyPath keyPath: KeyPath<Root, KeyType>, equator: @escaping (KeyType, KeyType) -> Bool) where KeyType : Equatable
Parameters
keyPath
The key to include when equating 2 instances of
Root
.