Pulse that stores a current value and can also indicate a potentially change to an updated value. A pulse may indicate that no current value has been set yet but updates must always contain a value.
Type parameters
- P
-
Stored value type of the Pulse
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
Value members
Concrete methods
If the pulse indicates a change: Applies a filter function to the updated value of the pulse. Based on the filter function, the updated value is retained or an empty pulse is returned. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.
If the pulse indicates a change: Applies a filter function to the updated value of the pulse. Based on the filter function, the updated value is retained or an empty pulse is returned. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.
Value parameters
- p
-
Filter function to be applied to the updated pulse value
Attributes
- Returns
-
A pulse with the updated pulse value if the filter function returns true, an empty pulse otherwise
If the pulse indicates a change: Applies a function to the updated value. The function has to return a new pulse that is returned by this function. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.
If the pulse indicates a change: Applies a function to the updated value. The function has to return a new pulse that is returned by this function. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.
Type parameters
- Q
-
Value type of the pulse returned by the applied function
Value parameters
- f
-
Function to be applied on the updated pulse value
Attributes
- Returns
-
Pulse returned by the applied function or an empty pulse if there is no updated value
Checks if the pulse indicates a change
Checks if the pulse indicates a change
Attributes
- Returns
-
True if the pulse indicates a change, false if not
If the pulse indicates a change: Applies a function to the updated value of the pulse and returns a new pulse indicating a change to this updated value. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.
If the pulse indicates a change: Applies a function to the updated value of the pulse and returns a new pulse indicating a change to this updated value. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.
Type parameters
- Q
-
Result type of the applied function
Value parameters
- f
-
Function to be applied on the updated pulse value
Attributes
- Returns
-
Pulse indicating the update performed by the applied function or an empty pulse if there is no updated value
converts the pulse to an option of try
converts the pulse to an option of try