proxygen
Actions.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
12 #include <folly/ExceptionWrapper.h>
13 #include <folly/io/IOBuf.h>
15 #include <folly/small_vector.h>
16 
17 namespace fizz {
18 
23  std::unique_ptr<folly::IOBuf> data;
24 };
25 
36 struct WriteToSocket {
38 #if defined(__ANDROID__)
39  std::vector<TLSContent> contents;
40 #else
42 #endif
44 };
45 
49 struct ReportError {
51 
52  explicit ReportError(const std::string& errorMsg)
53  : error(folly::make_exception_wrapper<std::runtime_error>(errorMsg)) {}
54 
55  explicit ReportError(folly::exception_wrapper e) : error(std::move(e)) {}
56 };
57 
62 struct WaitForData {};
63 
64 namespace detail {
65 
66 template <typename ActionsType>
67 void addAction(ActionsType& /*acts*/) {}
68 
69 template <typename ActionsType, typename ActionType, typename... Args>
70 void addAction(ActionsType& acts, ActionType&& thisAct, Args&&... act) {
71  acts.emplace_back(std::forward<ActionType>(thisAct));
72  addAction(acts, std::forward<Args>(act)...);
73 }
74 } // namespace detail
75 } // namespace fizz
ReportError(const std::string &errorMsg)
Definition: Actions.h:52
flags
Definition: http_parser.h:127
ReportError(folly::exception_wrapper e)
Definition: Actions.h:55
void addAction(ActionsType &acts, ActionType &&thisAct, Args &&...act)
Definition: Actions.h:70
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
folly::small_vector< TLSContent, 4 > contents
Definition: Actions.h:41
STL namespace.
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29
folly::exception_wrapper error
Definition: Actions.h:50
Definition: Actions.h:16
exception_wrapper make_exception_wrapper(As &&...as)
const char * string
Definition: Conv.cpp:212
std::unique_ptr< folly::IOBuf > data
Definition: Actions.h:23