BindingTarget
public struct BindingTarget<Value> : BindingTargetProvider
A binding target that can be used with the <~ operator.
-
Creates a binding target which consumes values on the specified scheduler.
If no scheduler is specified, the binding target would consume the value immediately.
Declaration
Swift
public init(on scheduler: Scheduler = ImmediateScheduler(), lifetime: Lifetime, action: @escaping (Value) -> Void)Parameters
schedulerThe scheduler on which the
actionconsumes the values.lifetimeThe expected lifetime of any bindings towards
self.actionThe action to consume values.
-
Creates a binding target which consumes values on the specified scheduler.
If no scheduler is specified, the binding target would consume the value immediately.
Declaration
Swift
public init<Object>(on scheduler: Scheduler = ImmediateScheduler(), lifetime: Lifetime, object: Object, keyPath: WritableKeyPath<Object, Value>) where Object : AnyObjectParameters
schedulerThe scheduler on which the key path consumes the values.
lifetimeThe expected lifetime of any bindings towards
self.objectThe object to consume values.
keyPathThe key path of the object that consumes values.
View on GitHub
Install in Dash
BindingTarget Structure Reference