13#include <rpp/operators/fwd.hpp>
15#include <rpp/defs.hpp>
16#include <rpp/operators/details/strategy.hpp>
17#include <rpp/utils/exceptions.hpp>
21namespace rpp::operators::details
23 template<rpp::constra
int::observer TObserver>
26 static constexpr auto preferred_disposables_mode = rpp::details::observers::disposables_mode::None;
28 RPP_NO_UNIQUE_ADDRESS TObserver
observer;
32 void on_next(T&& v)
const
46 void on_error(
const std::exception_ptr& err)
const {
observer.
on_error(err); }
48 void on_completed()
const
69 template<rpp::constra
int::decayed_type T>
72 using result_type = T;
74 template<rpp::constra
int::observer_of_type<result_type> TObserver>
78 template<rpp::details::observables::constra
int::disposables_strategy Prev>
79 using updated_optimal_disposables_strategy = Prev;
83namespace rpp::operators
void on_next(const Type &v) const noexcept
Observable calls this method to notify observer about new value.
Definition observer.hpp:84
void set_upstream(const disposable_wrapper &d) noexcept
Observable calls this method to pass disposable. Observer disposes this disposable WHEN observer want...
Definition observer.hpp:49
void on_completed() const noexcept
Observable calls this method to notify observer about completion of emissions.
Definition observer.hpp:135
void on_error(const std::exception_ptr &err) const noexcept
Observable calls this method to notify observer about some error during generation next data.
Definition observer.hpp:120
bool is_disposed() const noexcept
Observable calls this method to check if observer interested or not in emissions.
Definition observer.hpp:74
Base class for any observer used in RPP. It handles core callbacks of observers. Objects of this clas...
Definition observer.hpp:172
Definition strategy.hpp:28
auto element_at(size_t index)
Emit item located at specified index location in the sequence of items emitted by the source observab...
Definition element_at.hpp:97
Definition element_at.hpp:25
Definition element_at.hpp:71
Definition element_at.hpp:66
Definition exceptions.hpp:33