13#include <rpp/observables/fwd.hpp>
14#include <rpp/observers/fwd.hpp>
15#include <rpp/schedulers/fwd.hpp>
17#include <rpp/memory_model.hpp>
18#include <rpp/utils/constraints.hpp>
19#include <rpp/utils/function_traits.hpp>
20#include <rpp/utils/utils.hpp>
24namespace rpp::constraint
26 template<
typename S,
typename T>
30 } -> std::same_as<void>;
36 template<constra
int::decayed_type Type, constra
int::on_subscribe<Type> OnSubscribe>
37 auto create(OnSubscribe&& on_subscribe);
39 template<utils::is_not_
template_callable OnSubscribe, constra
int::decayed_type Type = rpp::utils::extract_observer_type_t<rpp::utils::decayed_function_argument_t<OnSubscribe>>>
40 auto create(OnSubscribe&& on_subscribe);
42 template<constra
int::memory_model MemoryModel = memory_model::use_stack, constra
int::iterable Iterable, schedulers::constra
int::scheduler TScheduler = rpp::schedulers::defaults::iteration_scheduler>
43 auto from_iterable(Iterable&& iterable,
const TScheduler& scheduler = TScheduler{});
45 template<constraint::memory_model MemoryModel = memory_model::use_stack,
typename T,
typename... Ts>
46 requires (constraint::decayed_same_as<T, Ts> && ...)
47 auto just(T&& item, Ts&&... items);
49 template<constraint::memory_model MemoryModel = memory_model::use_stack, schedulers::constraint::scheduler TScheduler,
typename T,
typename... Ts>
50 requires (constraint::decayed_same_as<T, Ts> && ...)
51 auto just(
const TScheduler& scheduler, T&& item, Ts&&... items);
53 template<constra
int::memory_model MemoryModel = memory_model::use_stack, std::invocable<> Callable>
57 requires (std::same_as<rpp::utils::extract_observable_type_t<TObservable>, rpp::utils::extract_observable_type_t<TObservables>> && ...)
58 auto concat(TObservable&& obs, TObservables&&... others);
60 template<constra
int::memory_model MemoryModel = memory_model::use_stack, constra
int::iterable Iterable>
61 requires constraint::observable<utils::iterable_value_t<Iterable>>
62 auto concat(Iterable&& iterable);
64 template<std::invocable Factory>
66 auto defer(Factory&& observable_factory);
68 template<constra
int::decayed_type Type>
69 auto error(std::exception_ptr err);
71 template<constra
int::decayed_type Type>
74 template<schedulers::constra
int::scheduler TScheduler>
75 auto interval(rpp::schedulers::duration initial, rpp::schedulers::duration period, TScheduler&& scheduler);
77 template<schedulers::constra
int::scheduler TScheduler>
78 auto interval(rpp::schedulers::time_point initial, rpp::schedulers::duration period, TScheduler&& scheduler);
80 template<schedulers::constra
int::scheduler TScheduler>
81 auto interval(rpp::schedulers::duration period, TScheduler&& scheduler);
83 template<constra
int::decayed_type Type>
86 template<schedulers::constra
int::scheduler TScheduler>
87 auto timer(rpp::schedulers::duration when, TScheduler&& scheduler);
89 template<schedulers::constra
int::scheduler TScheduler>
90 auto timer(rpp::schedulers::time_point when, TScheduler&& scheduler);
Base class for any observer used in RPP. It handles core callbacks of observers. Objects of this clas...
Definition observer.hpp:172
auto never()
Creates rpp::observable that emits no items and does not terminate.
Definition never.hpp:46
auto just(const TScheduler &scheduler, T &&item, Ts &&... items)
Creates rpp::observable that emits a particular items and completes.
Definition from.hpp:201
auto interval(rpp::schedulers::duration initial, rpp::schedulers::duration period, TScheduler &&scheduler)
Creates rpp::observable that emits a sequential integer every specified time interval,...
Definition interval.hpp:72
auto error(std::exception_ptr err)
Creates rpp::observable that emits no items and terminates with an error.
Definition error.hpp:49
auto from_callable(Callable &&callable)
Creates rpp::specific_observable that calls provided callable and emits resulting value of this calla...
Definition from.hpp:249
auto concat(TObservable &&obs, TObservables &&... others)
Make observable which would merge emissions from underlying observables but without overlapping (curr...
Definition concat.hpp:171
auto from_iterable(Iterable &&iterable, const TScheduler &scheduler)
Creates observable that emits a items from provided iterable.
Definition from.hpp:175
auto empty()
Creates rpp::observable that emits no items but terminates normally.
Definition empty.hpp:48
auto defer(Factory &&observable_factory)
Creates rpp::observable that calls the specified observable factory to create an observable for each ...
Definition defer.hpp:57
auto create(OnSubscribe &&on_subscribe)
Construct observable specialized with passed callback function. Most easiesest way to construct obser...
Definition create.hpp:57
auto timer(rpp::schedulers::duration when, TScheduler &&scheduler)
Creates rpp::observable that emits an integer after a given delay, on the specified scheduler.
Definition timer.hpp:22