proxygen
folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF > Class Template Reference

#include <flow_receiver.h>

Public Types

using properties = property_set_insert_t< properties_t< Data >, property_set< is_receiver<>, is_flow<>>>
 

Public Member Functions

constexpr flow_receiver (Data d)
 
constexpr flow_receiver (Data d, DDF df)
 
constexpr flow_receiver (Data d, DEF ef, DDF df=DDF{})
 
constexpr flow_receiver (Data d, DVF nf, DEF ef=DEF{}, DDF df=DDF{}, DStrtF strtf=DStrtF{})
 
Datadata ()
 
requires Invocable< DVF &, Data &, V > void value (V &&v)
 
requires Invocable< DEF &, Data &, E > void error (E &&e) noexcept
 
void done ()
 
requires Invocable< DStrtF &, Data &, Up && > void starting (Up &&up)
 

Private Attributes

bool done_ = false
 
bool started_ = false
 
Data data_
 
DVF nf_
 
DEF ef_
 
DDF df_
 
DStrtF strtf_
 

Detailed Description

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF, class DEF, class DDF, class DStrtF>
class folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >

Definition at line 236 of file flow_receiver.h.

Member Typedef Documentation

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
using folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::properties = property_set_insert_t<properties_t<Data>, property_set<is_receiver<>, is_flow<>>>

Definition at line 246 of file flow_receiver.h.

Constructor & Destructor Documentation

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
constexpr folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::flow_receiver ( Data  d)
inlineexplicit

Definition at line 255 of file flow_receiver.h.

256  : flow_receiver(std::move(d), DVF{}, DEF{}, DDF{}) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
constexpr folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::flow_receiver ( Data  d,
DDF  df 
)
inline
template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
constexpr folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::flow_receiver ( Data  d,
DEF  ef,
DDF  df = DDF{} 
)
inline
template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
constexpr folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::flow_receiver ( Data  d,
DVF  nf,
DEF  ef = DEF{},
DDF  df = DDF{},
DStrtF  strtf = DStrtF{} 
)
inline

Member Function Documentation

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
Data& folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::data ( )
inline
template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
void folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::done ( )
inline
template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
requires Invocable<DEF&, Data&, E> void folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::error ( E &&  e)
inlinenoexcept

Definition at line 285 of file flow_receiver.h.

285  {
286  static_assert(
287  NothrowInvocable<DEF&, Data&, E>, "error function must be noexcept");
288  if (!started_) {std::abort();}
289  if (done_){ return; }
290  done_ = true;
291  ef_(data_, (E&&) e);
292  }
template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
requires Invocable<DStrtF&, Data&, Up&&> void folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::starting ( Up &&  up)
inline
template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
requires Invocable<DVF&, Data&, V> void folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::value ( V &&  v)
inline

Member Data Documentation

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
Data folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::data_
private

Definition at line 239 of file flow_receiver.h.

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
DDF folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::df_
private

Definition at line 242 of file flow_receiver.h.

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
bool folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::done_ = false
private

Definition at line 237 of file flow_receiver.h.

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
DEF folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::ef_
private

Definition at line 241 of file flow_receiver.h.

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
DVF folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::nf_
private

Definition at line 240 of file flow_receiver.h.

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
bool folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::started_ = false
private

Definition at line 238 of file flow_receiver.h.

template<PUSHMI_TYPE_CONSTRAINT(Receiver) Data, class DVF , class DEF , class DDF , class DStrtF >
DStrtF folly::pushmi::flow_receiver< Data, DVF, DEF, DDF, DStrtF >::strtf_
private

Definition at line 243 of file flow_receiver.h.


The documentation for this class was generated from the following file: