-
lens(for:)
Extension methodGenerates a Lens for the field indicated by its key path.
Declaration
Swift
static func lens<T>(for path: WritableKeyPath<Self, T>) -> Lens<Self, T>
Parameters
path
Key path identifying the field where the Lens focuses.
Return Value
A Lens focusing in the field.