proxygen
folly::pushmi::flow_receiver< VF, EF, DF, StrtF > Class Template Reference

#include <flow_receiver.h>

Public Types

using properties = property_set< is_receiver<>, is_flow<>>
 

Public Member Functions

 flow_receiver ()=default
 
constexpr flow_receiver (VF nf)
 
constexpr flow_receiver (EF ef)
 
constexpr flow_receiver (DF df)
 
constexpr flow_receiver (EF ef, DF df)
 
constexpr flow_receiver (VF nf, EF ef, DF df=DF{}, StrtF strtf=StrtF{})
 
requires Invocable< VF &, V > void value (V &&v)
 
requires Invocable< EF &, E > void error (E e) noexcept
 
void done ()
 
requires Invocable< StrtF &, Up && > void starting (Up &&up)
 

Private Attributes

bool done_ = false
 
bool started_ = false
 
VF nf_
 
EF ef_
 
DF df_
 
StrtF strtf_
 

Detailed Description

template<class VF, class EF, class DF, class StrtF>
class folly::pushmi::flow_receiver< VF, EF, DF, StrtF >

Definition at line 160 of file flow_receiver.h.

Member Typedef Documentation

template<class VF , class EF , class DF , class StrtF >
using folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::properties = property_set<is_receiver<>, is_flow<>>

Definition at line 169 of file flow_receiver.h.

Constructor & Destructor Documentation

template<class VF , class EF , class DF , class StrtF >
folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::flow_receiver ( )
default
template<class VF , class EF , class DF , class StrtF >
constexpr folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::flow_receiver ( VF  nf)
inlineexplicit

Definition at line 179 of file flow_receiver.h.

180  : flow_receiver(std::move(nf), EF{}, DF{}) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class VF , class EF , class DF , class StrtF >
constexpr folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::flow_receiver ( EF  ef)
inlineexplicit

Definition at line 181 of file flow_receiver.h.

References folly::gen::move.

182  : flow_receiver(VF{}, std::move(ef), DF{}) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class VF , class EF , class DF , class StrtF >
constexpr folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::flow_receiver ( DF  df)
inlineexplicit

Definition at line 183 of file flow_receiver.h.

References folly::gen::move.

184  : flow_receiver(VF{}, EF{}, std::move(df)) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class VF , class EF , class DF , class StrtF >
constexpr folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::flow_receiver ( EF  ef,
DF  df 
)
inline
template<class VF , class EF , class DF , class StrtF >
constexpr folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::flow_receiver ( VF  nf,
EF  ef,
DF  df = DF{},
StrtF  strtf = StrtF{} 
)
inline

Member Function Documentation

template<class VF , class EF , class DF , class StrtF >
void folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::done ( )
inline
template<class VF , class EF , class DF , class StrtF >
requires Invocable<EF&, E> void folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::error ( E  e)
inlinenoexcept

Definition at line 205 of file flow_receiver.h.

References folly::gen::move.

205  {
206  static_assert(NothrowInvocable<EF&, E>, "error function must be noexcept");
207  if (!started_) {std::abort();}
208  if (done_){ return; }
209  done_ = true;
210  ef_(std::move(e));
211  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class VF , class EF , class DF , class StrtF >
requires Invocable<StrtF&, Up&&> void folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::starting ( Up &&  up)
inline

Definition at line 220 of file flow_receiver.h.

References PUSHMI_TYPE_CONSTRAINT, and folly::pushmi::requires().

220  {
221  if (started_) {std::abort();}
222  started_ = true;
223  strtf_( (Up &&) up);
224  }
template<class VF , class EF , class DF , class StrtF >
requires Invocable<VF&, V> void folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::value ( V &&  v)
inline

Member Data Documentation

template<class VF , class EF , class DF , class StrtF >
DF folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::df_
private

Definition at line 165 of file flow_receiver.h.

template<class VF , class EF , class DF , class StrtF >
bool folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::done_ = false
private

Definition at line 161 of file flow_receiver.h.

template<class VF , class EF , class DF , class StrtF >
EF folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::ef_
private

Definition at line 164 of file flow_receiver.h.

template<class VF , class EF , class DF , class StrtF >
VF folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::nf_
private

Definition at line 163 of file flow_receiver.h.

template<class VF , class EF , class DF , class StrtF >
bool folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::started_ = false
private

Definition at line 162 of file flow_receiver.h.

template<class VF , class EF , class DF , class StrtF >
StrtF folly::pushmi::flow_receiver< VF, EF, DF, StrtF >::strtf_
private

Definition at line 166 of file flow_receiver.h.


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