proxygen
folly::pushmi::detail::for_each_fn::Pull< In, Out > Struct Template Reference
Inheritance diagram for folly::pushmi::detail::for_each_fn::Pull< In, Out >:

Public Types

using properties = property_set_insert_t< properties_t< Out >, property_set< is_flow<>>>
 

Public Member Functions

 Pull (Out out)
 
template<class... VN>
void value (VN &&...vn)
 
template<class E >
void error (E &&e)
 
void done ()
 
requires Receiver< Up > &&ReceiveValue< Up, std::ptrdiff_t > void starting (Up up)
 
requires ReceiveValue< Up > void starting (Up)
 

Public Attributes

std::function< void(std::ptrdiff_t)> pull
 

Detailed Description

template<class In, class Out>
struct folly::pushmi::detail::for_each_fn::Pull< In, Out >

Definition at line 32 of file for_each.h.

Member Typedef Documentation

template<class In , class Out >
using folly::pushmi::detail::for_each_fn::Pull< In, Out >::properties = property_set_insert_t<properties_t<Out>, property_set<is_flow<>>>

Definition at line 35 of file for_each.h.

Constructor & Destructor Documentation

template<class In , class Out >
folly::pushmi::detail::for_each_fn::Pull< In, Out >::Pull ( Out  out)
inlineexplicit

Definition at line 33 of file for_each.h.

33 : Out(std::move(out)) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Function Documentation

template<class In , class Out >
void folly::pushmi::detail::for_each_fn::Pull< In, Out >::done ( )
inline

Definition at line 48 of file for_each.h.

References folly::pushmi::detail::PUSHMI_TEMPLATE(), folly::pushmi::detail::requires(), and folly::pushmi::set_done.

48  {
49  // break circular reference
50  pull = nullptr;
51  ::folly::pushmi::set_done(static_cast<Out&>(*this));
52  }
std::function< void(std::ptrdiff_t)> pull
Definition: for_each.h:36
PUSHMI_INLINE_VAR constexpr __adl::set_done_fn set_done
template<class In , class Out >
template<class E >
void folly::pushmi::detail::for_each_fn::Pull< In, Out >::error ( E &&  e)
inline

Definition at line 43 of file for_each.h.

References folly::pushmi::set_error.

43  {
44  // break circular reference
45  pull = nullptr;
46  ::folly::pushmi::set_error(static_cast<Out&>(*this), (E &&) e);
47  }
PUSHMI_INLINE_VAR constexpr __adl::set_error_fn set_error
std::function< void(std::ptrdiff_t)> pull
Definition: for_each.h:36
template<class In , class Out >
requires Receiver<Up>&& ReceiveValue<Up, std::ptrdiff_t> void folly::pushmi::detail::for_each_fn::Pull< In, Out >::starting ( Up  up)
inline

Definition at line 55 of file for_each.h.

References folly::gen::move, folly::pushmi::detail::PUSHMI_TEMPLATE(), folly::pushmi::detail::requires(), and folly::pushmi::set_value.

55  {
56  pull = [up = std::move(up)](std::ptrdiff_t requested) mutable {
57  ::folly::pushmi::set_value(up, requested);
58  };
59  pull(1);
60  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::function< void(std::ptrdiff_t)> pull
Definition: for_each.h:36
PUSHMI_INLINE_VAR constexpr __adl::set_value_fn set_value
template<class In , class Out >
requires ReceiveValue<Up> void folly::pushmi::detail::for_each_fn::Pull< In, Out >::starting ( Up  )
inline

Definition at line 63 of file for_each.h.

63 {}
template<class In , class Out >
template<class... VN>
void folly::pushmi::detail::for_each_fn::Pull< In, Out >::value ( VN &&...  vn)
inline

Definition at line 38 of file for_each.h.

References folly::pushmi::set_value.

38  {
39  ::folly::pushmi::set_value(static_cast<Out&>(*this), (VN &&) vn...);
40  pull(1);
41  }
std::function< void(std::ptrdiff_t)> pull
Definition: for_each.h:36
PUSHMI_INLINE_VAR constexpr __adl::set_value_fn set_value

Member Data Documentation

template<class In , class Out >
std::function<void(std::ptrdiff_t)> folly::pushmi::detail::for_each_fn::Pull< In, Out >::pull

Definition at line 36 of file for_each.h.


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