operator_count
The count operator counts upstream emissions and emits the total once
upstream completes.
See Also
- IsEmptyOperator - Emit a single boolean indicating if the source emitted anything before it had completed.
- FilterOperator - Keep values that satisfy a predicate.
- ReduceOperator - Fold values and emit only the final accumulator on completion.
Example
let _subscription =
.into_observable
.filter
.count
.subscribe;
Output:
count_operator - next: 3
count_operator - completed
count_operator - unsubscribed