BindingTarget

public struct BindingTarget<Value>: BindingTargetProvider

A binding target that can be used with the <~ operator.

  • Creates a binding target.

    Declaration

    Swift

    public init(lifetime: Lifetime, action: @escaping (Value) -> Void)

    Parameters

    lifetime

    The expected lifetime of any bindings towards self.

    action

    The action to consume values.

  • Creates a binding target which consumes values on the specified scheduler.

    Declaration

    Swift

    public init(on scheduler: Scheduler, lifetime: Lifetime, action: @escaping (Value) -> Void)

    Parameters

    scheduler

    The scheduler on which the setter consumes the values.

    lifetime

    The expected lifetime of any bindings towards self.

    action

    The action to consume values.