BoundSetter
public class BoundSetter<S, A>
A BoundSetter is a Setter that is already bound to a concrete source.
-
Initializes a BoundSetter.
Declaration
Swift
public init(value: S, setter: Setter<S, A>)Parameters
valueBound source.
setterSetter.
-
Modifies the source of the bound setter.
Declaration
Swift
public func modify(_ f: @escaping (A) -> A) -> SParameters
fFunction modifying the focus.
Return Value
Modified source.
-
Sets a new value for the focus.
Declaration
Swift
public func set(_ a: A) -> SParameters
aNew focus.
Return Value
Modified source.
-
Composes with a
Setter.Declaration
Swift
public func compose<T>(_ other: Setter<A, T>) -> BoundSetter<S, T>Parameters
otherValue to compose with.
Return Value
A
BoundSetterwith the same bound source and aSetterresulting from the sequential application of the two optics. -
Composes with an
AffineTraversal.Declaration
Swift
public func compose<T>(_ other: AffineTraversal<A, T>) -> BoundSetter<S, T>Parameters
otherValue to compose with.
Return Value
A
BoundSetterwith the same bound source and aSetterresulting from the sequential application of the two optics. -
Composes with a
Prism.Declaration
Swift
public func compose<T>(_ other: Prism<A, T>) -> BoundSetter<S, T>Parameters
otherValue to compose with.
Return Value
A
BoundSetterwith the same bound source and aSetterresulting from the sequential application of the two optics. -
Composes with a
Lens.Declaration
Swift
public func compose<T>(_ other: Lens<A, T>) -> BoundSetter<S, T>Parameters
otherValue to compose with.
Return Value
A
BoundSetterwith the same bound source and aSetterresulting from the sequential application of the two optics. -
Composes with an
Iso.Declaration
Swift
public func compose<T>(_ other: Iso<A, T>) -> BoundSetter<S, T>Parameters
otherValue to compose with.
Return Value
A
BoundSetterwith the same bound source and aSetterresulting from the sequential application of the two optics.
Install in Dash
BoundSetter Class Reference