13#include <rpp/schedulers/constraints.hpp>
14#include <rpp/sources/fwd.hpp>
15#include <rpp/observables/constraints.hpp>
16#include <rpp/observables/details/member_overload.hpp>
25template<constra
int::decayed_type Type, constra
int::observable_of_type<Type> FallbackObs, schedulers::constra
int::scheduler TScheduler>
28template<constra
int::decayed_type Type,
typename SpecificObservable>
52 template<constra
int::observable_of_type<Type> FallbackObs, schedulers::constra
int::scheduler TScheduler>
53 auto timeout(schedulers::duration period, FallbackObs&& fallback_obs,
const TScheduler& scheduler = TScheduler{})
const &
requires is_header_included<timeout_tag, FallbackObs, TScheduler>
55 return static_cast<const SpecificObservable*
>(
this)->
template lift<Type>(
timeout_impl<Type, std::decay_t<FallbackObs>, TScheduler>{period, std::forward<FallbackObs>(fallback_obs), scheduler});
58 template<constra
int::observable_of_type<Type> FallbackObs,schedulers::constra
int::scheduler TScheduler>
59 auto timeout(schedulers::duration period, FallbackObs&& fallback_obs,
const TScheduler& scheduler = TScheduler{}) &&
requires is_header_included<timeout_tag, FallbackObs, TScheduler>
61 return std::move(*
static_cast<SpecificObservable*
>(
this)).template lift<Type>(
timeout_impl<Type, std::decay_t<FallbackObs>, TScheduler>{period, std::forward<FallbackObs>(fallback_obs), scheduler});
83 template<schedulers::constra
int::scheduler TScheduler>
84 auto timeout(schedulers::duration period,
const TScheduler& scheduler = TScheduler{})
const &
requires is_header_included<timeout_tag, TScheduler>
86 return timeout(period, rpp::source::error<Type>(std::make_exception_ptr(utils::timeout{
"Timeout reached"})), scheduler);
89 template<schedulers::constra
int::scheduler TScheduler>
90 auto timeout(schedulers::duration period,
const TScheduler& scheduler = TScheduler{}) &&
requires is_header_included<timeout_tag, TScheduler>
92 return std::move(*
static_cast<SpecificObservable*
>(
this)).timeout(period, rpp::source::error<Type>(std::make_exception_ptr(utils::timeout{
"Timeout reached"})), scheduler);
Definition: member_overload.hpp:19
Definition: timeout.hpp:68