ReactivePlusPlus
ReactiveX implementation for C++20
|
Conditional operators are operators that emit items based on some condition including condition of items from other observables. More...
Functions | |
template<rpp::constraint::observable TObservable> | |
auto | rpp::operators::take_until (TObservable &&until_observable) |
Discard any items emitted by an Observable after a second Observable emits an item or terminates. | |
template<typename Fn> requires (!utils::is_not_template_callable<Fn> || std::same_as<bool, std::invoke_result_t<Fn, rpp::utils::convertible_to_any>>) | |
auto | rpp::operators::take_while (Fn &&predicate) |
Sends items from observable while items are satisfy predicate. When condition becomes false -> sends on_completed | |
Conditional operators are operators that emit items based on some condition including condition of items from other observables.
auto rpp::operators::take_until | ( | TObservable && | until_observable | ) |
Discard any items emitted by an Observable after a second Observable emits an item or terminates.
Actually this operator just subscribes on 2 observables and completes original when until_observable
emits any value
until_observable | is the observables that stops the source observable from sending values when it emits one value or sends a on_error/on_completed event. |
#include <rpp/operators/take_until.hpp>
auto rpp::operators::take_while | ( | Fn && | predicate | ) |
Sends items from observable while items are satisfy predicate. When condition becomes false -> sends on_completed
Actually this operator just emits values while predicate returns true
predicate | is predicate used to check items. Accepts value from observable and returns true if value should be forwarded and false if emissions should be stopped and observable should be terminated. |
#include <rpp/operators/take_while.hpp>