AutoTraversal
public protocol AutoTraversal : AutoLens
Protocol for automatic derivation of Traversal
-
traversal(for:)
Extension methodProvides a Traversal focused on the items of the field given by a key path.
Declaration
Swift
static func traversal<T>(for path: WritableKeyPath<Self, Array<T>>) -> Traversal<Self, T>
Parameters
path
Key path to a field containing an array of items.
Return Value
A Traversal focused on the items of the field.
-
traversal(for:)
Extension methodProvides a Traversal focused on the items of the field given by a key path.
Declaration
Swift
static func traversal<T>(for path: WritableKeyPath<Self, ArrayK<T>>) -> Traversal<Self, T>
Parameters
path
Key path to a field containing an
ArrayK
of items.Return Value
A Traversal focused on the items of the field.
-
traversal(for:)
Extension method