13#include <rpp/memory_model.hpp>
14#include <rpp/schedulers/constraints.hpp>
15#include <rpp/schedulers/fwd.hpp>
16#include <rpp/utils/function_traits.hpp>
17#include <rpp/subscribers/constraints.hpp>
18#include <rpp/utils/operator_declaration.hpp>
20#include <rpp/observables/fwd.hpp>
34namespace rpp::observable
37template<constra
int::decayed_type Type, constra
int::on_subscribe_fn<Type> OnSubscribeFn>
38auto create(OnSubscribeFn&& on_subscribe)
requires rpp::details::is_header_included<rpp::details::create_tag, Type, OnSubscribeFn>;
40template<utils::is_callable OnSubscribeFn, constra
int::decayed_type Type = utils::extract_subscriber_type_t<utils::function_argument_t<OnSubscribeFn>>>
41 requires constraint::on_subscribe_fn<OnSubscribeFn, Type>
42auto create(OnSubscribeFn&& on_subscribe)
requires rpp::details::is_header_included<rpp::details::create_tag, Type, OnSubscribeFn>;
45template<constra
int::decayed_type Type>
46auto empty()
requires rpp::details::is_header_included<rpp::details::empty_tag, Type>;
49template<constraint::decayed_type Type>
50auto
never() requires rpp::details::is_header_included<rpp::details::never_tag, Type>;
53template<constraint::decayed_type Type>
54auto
error(const std::exception_ptr& err) requires rpp::details::is_header_included<rpp::details::error_tag, Type>;
57template<memory_model memory_model = memory_model::use_stack, typename T, typename ...Ts>
58auto just(const schedulers::constraint::scheduler auto& scheduler, T&& item, Ts&& ...items) requires (rpp::details::is_header_included<rpp::details::just_tag, T, Ts...> && (constraint::decayed_same_as<T, Ts> && ...));
60template<memory_model memory_model = memory_model::use_stack, typename T, typename ...Ts>
61auto just(T&& item, Ts&& ...items) requires (rpp::details::is_header_included<rpp::details::just_tag, T, Ts...> && (constraint::decayed_same_as<T, Ts> && ...));
63template<memory_model memory_model= memory_model::use_stack, schedulers::constraint::scheduler TScheduler = schedulers::trampoline>
64auto
from_iterable(constraint::iterable auto&& iterable, const TScheduler& scheduler = TScheduler{})
requires rpp::details::is_header_included <rpp::details::from_tag, TScheduler > ;
66template<memory_model memory_model = memory_model::use_stack>
67auto from_callable(std::invocable<>
auto&& callable)
requires rpp::details::is_header_included<rpp::details::from_tag,
decltype(callable)>;
70template<schedulers::constra
int::scheduler TScheduler = schedulers::trampoline>
71auto interval(schedulers::duration period,
const TScheduler& scheduler = TScheduler{})
requires rpp::details::is_header_included<rpp::details::interval_tag, TScheduler>;
73template<schedulers::constra
int::scheduler TScheduler = schedulers::trampoline>
74auto interval(schedulers::duration first_delay, schedulers::duration period,
const TScheduler& scheduler = TScheduler{})
requires rpp::details::is_header_included<rpp::details::interval_tag, TScheduler>;
79namespace source = observable;
auto empty()
Creates rpp::specific_observable that emits no items but terminates normally.
Definition: empty.hpp:32
auto interval(schedulers::duration period, const TScheduler &scheduler=TScheduler{})
Creates rpp::specific_observable which emits sequence of size_t every provided time interval.
Definition: interval.hpp:43
auto from_callable(std::invocable<> auto &&callable)
Creates rpp::specific_observable that calls provided callable and emits resulting value of this calla...
Definition: from.hpp:227
auto error(const std::exception_ptr &err)
Creates rpp::specific_observable that emits no items and terminates with an error.
Definition: error.hpp:34
auto never()
Creates rpp::specific_observable that emits no items and does not terminate.
Definition: never.hpp:31
auto create(OnSubscribeFn &&on_subscribe)
Creates rpp::specific_observable with passed action as OnSubscribe.
Definition: create.hpp:40
auto from_iterable(constraint::iterable auto &&iterable, const TScheduler &scheduler)
Creates rpp::specific_observable that emits a items from provided iterable.
Definition: from.hpp:207