public protocol AutoOptics
Base protocol for optics automatic derivation.
Creates a copy of this object, replacing the value at the given key path by the provided value.
func copy<T>(with value: T, for path: WritableKeyPath<Self, T>) -> Self
New value for the field in the copy.
Key path of the field that will be modified in the copy.
A copy of this value with the modified field.