proxygen
error.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018-present Facebook, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
20 
21 namespace folly {
22 namespace pushmi {
23 namespace detail {
24 struct single_error_sender_base : single_sender<ignoreSF, inlineEXF> {
25  using properties = property_set<
30 };
31 template <class E, class... VN>
33  E e_;
34  PUSHMI_TEMPLATE(class Out)
35  (requires ReceiveError<Out, E>&& ReceiveValue<Out, VN...>)
36  void operator()(
38  Out out) {
39  set_error(out, std::move(e_));
40  }
41 };
42 } // namespace detail
43 
44 namespace operators {
45 
46 PUSHMI_TEMPLATE(class... VN, class E)
47 (requires And<SemiMovable<VN>...>&& SemiMovable<E>)
48 auto error(E e) {
49  return make_single_sender(
52 }
53 
54 } // namespace operators
55 } // namespace pushmi
56 } // namespace folly
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
PUSHMI_INLINE_VAR constexpr __adl::set_error_fn set_error
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29
requires And< SemiMovable< VN >... > &&SemiMovable< E > auto error(E e)
Definition: error.h:48
requires requires(::folly::pushmi::invoke(std::declval< F >(), std::get< Is >(std::declval< Tuple >())...))) const expr decltype(auto) apply_impl(F &&f
PUSHMI_TEMPLATE(class In, class Out, bool SenderRequires, bool SingleSenderRequires, bool TimeSingleSenderRequires)(requires Sender< In > &&Receiver< Out >) constexpr bool sender_requires_from()
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::make_single_sender_fn make_single_sender