@@ -13,9 +13,13 @@ import DiffableTextKit
1313// MARK: * Equals
1414//*============================================================================*
1515
16- /// A style that equals a proxy value.
16+ /// A style that binds its comparison to a proxy value.
1717///
18- /// Use this style to optimize the comparison on view update.
18+ /// Use this wrapper to optimize the comparison on view update.
19+ ///
20+ /// - Note: Use it only when you are know that the proxy value represents the state of the style,
21+ /// otherwise the user may lock themselves in state where all or some input is invalid. A state like this
22+ /// corrects itself only when the value or the editing mode changes.
1923///
2024public struct EqualsTextStyle < Style: DiffableTextStyle , Proxy: Equatable > : WrapperTextStyle {
2125
@@ -63,13 +67,27 @@ extension DiffableTextStyle {
6367 // MARK: Transformations
6468 //=------------------------------------------------------------------------=
6569
66- /// Binds the style's comparison result to the proxy value.
70+ /// Binds the style's comparison to a proxy value.
71+ ///
72+ /// Use this wrapper to optimize the comparison on view update.
73+ ///
74+ /// - Note: Use it only when you are know that the proxy value represents the state of the style,
75+ /// otherwise the user may lock themselves in state where all or some input is invalid. A state like this
76+ /// corrects itself only when the value or the editing mode changes.
77+ ///
6778 @inlinable @inline ( __always)
6879 public func equals( _ proxy: Void ) -> EqualsVoid {
6980 Equals ( self , proxy: _Void ( ) )
7081 }
7182
72- /// Binds the style's comparison result to the proxy value.
83+ /// Binds the style's comparison to a proxy value.
84+ ///
85+ /// Use this wrapper to optimize the comparison on view update.
86+ ///
87+ /// - Note: Use it only when you are know that the proxy value represents the state of the style,
88+ /// otherwise the user may lock themselves in state where all or some input is invalid. A state like this
89+ /// corrects itself only when the value or the editing mode changes.
90+ ///
7391 @inlinable @inline ( __always)
7492 public func equals< Proxy> ( _ proxy: Proxy ) -> Equals < Proxy > {
7593 Equals ( self , proxy: proxy)
0 commit comments