|
template<typename ... TStates>
requires (constraint::decayed_same_as<States, TStates> && ...) |
| state_observer (std::invocable< T, States... > auto &&on_next, std::invocable< std::exception_ptr, States... > auto &&on_error, std::invocable< States... > auto &&on_completed, TStates &&...states) |
|
void | on_next (const T &v) const |
| Observable calls this methods to notify observer about new value.
|
|
void | on_next (T &&v) const |
| Observable calls this methods to notify observer about new value.
|
|
void | on_error (const std::exception_ptr &err) const |
| Observable calls this method to notify observer about some error during generation next data.
|
|
void | on_completed () const |
| Observable calls this method to notify observer about finish of work.
|
|
template<constraint::decayed_type T, typename OnNext, typename OnError, typename OnCompleted, constraint::decayed_type ... States>
requires (std::invocable<OnNext, T, States...> && std::invocable<OnError, std::exception_ptr, States...> && std::invocable<OnCompleted, States...>)
class rpp::details::state_observer< T, OnNext, OnError, OnCompleted, States >
Special type of specific_observer which has some state which this observer stores and pass to each callback. Actually it is base class for all observers.