KeyPathProtocol
public protocol KeyPathProtocol : AnyKeyPath
KeyPaths with a statically known Value endpoint.
This protocol allows us to create the constraint that some Lens‘s Focus is-an instance of
KeyPath. For example:
public struct X<T, L: Lens> where L.Focus: KeyPath<T, L.Value> { ... }
^^^^^
-
The
KeyPath‘s focal point.Declaration
Swift
associatedtype Value
View on GitHub
KeyPathProtocol Protocol Reference