ReactiveSwift Docs

View on GitHub

Install in Dash

ReactiveSwift Reference ComposableMutablePropertyProtocol Protocol Reference

ComposableMutablePropertyProtocol

public protocol ComposableMutablePropertyProtocol : MutablePropertyProtocol 

Represents a mutable property that can be safety composed by exposing its synchronization mechanic through the defined closure-based interface.

  • Atomically performs an arbitrary action using the current value of the variable.

    Declaration

    Swift

    func withValue<Result>(_ action: (Value) throws -> Result) rethrows -> Result

    Parameters

    action

    A closure that accepts current property value.

    Return Value

    the result of the action.

  • Atomically modifies the variable.

    Declaration

    Swift

    func modify<Result>(_ action: (inout Value) throws -> Result) rethrows -> Result

    Parameters

    action

    A closure that accepts old property value and returns a new property value.

    Return Value

    The result of the action.

© 2020 ReactiveCocoa. All rights reserved. (Last updated: 2020年01月07日)

Generated by jazzy ♪♫ v0.13.0, a Realm project.

AltStyle によって変換されたページ (->オリジナル) /