-
setter(for:)
Extension methodGenerates a Setter for the provided field.
Declaration
Swift
static func setter<T>(for path: WritableKeyPath<Self, T>) -> Setter<Self, T>
Parameters
path
Key path for the field.
Return Value
A Setter that focuses on the provided field.
-
boundSetter(for:onValue:)
Extension methodGenerates a BoundSetter for the provided field on a specific value.
Declaration
Swift
static func boundSetter<T>(for path: WritableKeyPath<Self, T>, onValue value: Self) -> BoundSetter<Self, T>
Parameters
path
Key path for the field.
value
Value to bind the setter to.
Return Value
A BoundSetter that focuses on the provided field on the specific value.
-
boundSetter(for:)
Extension methodGenerates a BoundSetter for the provided field on this value.
Declaration
Swift
func boundSetter<T>(for path: WritableKeyPath<Self, T>) -> BoundSetter<Self, T>
Parameters
path
Key path for the field.
Return Value
A BoundSetter that focuses on the provided field.