folly::Future<std::pair< ::test_cpp2::cpp_reflection::struct2, std::unique_ptr<apache::thrift::transport::THeader>>> service2AsyncClient::header_future_methodE(apache::thrift::RpcOptions& rpcOptions) { folly::Promise<std::pair< ::test_cpp2::cpp_reflection::struct2, std::unique_ptr<apache::thrift::transport::THeader>>> promise179; auto future180 = promise179.getFuture(); auto callback181 = folly::make_unique<apache::thrift::HeaderFutureCallback< ::test_cpp2::cpp_reflection::struct2>>(std::move(promise179), recv_wrapped_methodE, channel_); methodE(rpcOptions, std::move(callback181)); return future180; }
folly::Future< ::test_cpp2::cpp_reflection::struct2> service2AsyncClient::future_methodE(apache::thrift::RpcOptions& rpcOptions) { folly::Promise< ::test_cpp2::cpp_reflection::struct2> promise176; auto future177 = promise176.getFuture(); auto callback178 = folly::make_unique<apache::thrift::FutureCallback< ::test_cpp2::cpp_reflection::struct2>>(std::move(promise176), recv_wrapped_methodE, channel_); methodE(rpcOptions, std::move(callback178)); return future177; }
void service2AsyncClient::sync_methodE(apache::thrift::RpcOptions& rpcOptions, ::test_cpp2::cpp_reflection::struct2& _return) { apache::thrift::ClientReceiveState _returnState; auto callback175 = folly::make_unique<apache::thrift::ClientSyncCallback>(&_returnState, getChannel()->getEventBase(), false); methodE(rpcOptions, std::move(callback175)); getChannel()->getEventBase()->loopForever(); SCOPE_EXIT { if (_returnState.header() && !_returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(_returnState.header()->releaseHeaders()); } }; if (!_returnState.buf()) { assert(_returnState.exception()); std::rethrow_exception(_returnState.exception()); } recv_methodE(_return, _returnState); }
folly::Future<std::unique_ptr< ::test_cpp2::cpp_reflection::struct2>> service2SvIf::future_methodE() { return apache::thrift::detail::si::future_returning_uptr([&]( ::test_cpp2::cpp_reflection::struct2& _return) { methodE(_return); }); }
void service2AsyncClient::methodE(std::function<void (::apache::thrift::ClientReceiveState&&)> callback) { methodE(folly::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback))); }
void service2AsyncClient::methodE(std::unique_ptr<apache::thrift::RequestCallback> callback) { ::apache::thrift::RpcOptions rpcOptions; methodE(rpcOptions, std::move(callback)); }