/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/sink/src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #include "thrift/compiler/test/fixtures/sink/gen-cpp2/SinkServiceAsyncClient.h" #include namespace cpp2 { typedef apache::thrift::ThriftPresult SinkService_method_pargs; typedef apache::thrift::ThriftPResultSink< apache::thrift::ThriftPresult, apache::thrift::ThriftPresult>, apache::thrift::ThriftPresult> > SinkService_method_presult; typedef apache::thrift::ThriftPresult SinkService_methodAndReponse_pargs; typedef apache::thrift::ThriftPResultSink< apache::thrift::ThriftPresult>, apache::thrift::ThriftPresult>, apache::thrift::ThriftPresult> > SinkService_methodAndReponse_presult; typedef apache::thrift::ThriftPresult SinkService_methodThrow_pargs; typedef apache::thrift::ThriftPResultSink< apache::thrift::ThriftPresult>, apache::thrift::ThriftPresult>, apache::thrift::ThriftPresult> > SinkService_methodThrow_presult; typedef apache::thrift::ThriftPresult SinkService_methodSinkThrow_pargs; typedef apache::thrift::ThriftPResultSink< apache::thrift::ThriftPresult, apache::thrift::ThriftPresult, apache::thrift::FieldData<1, ::apache::thrift::type_class::structure, ::cpp2::SinkException1>>, apache::thrift::ThriftPresult> > SinkService_methodSinkThrow_presult; typedef apache::thrift::ThriftPresult SinkService_methodFinalThrow_pargs; typedef apache::thrift::ThriftPResultSink< apache::thrift::ThriftPresult, apache::thrift::ThriftPresult>, apache::thrift::ThriftPresult, apache::thrift::FieldData<1, ::apache::thrift::type_class::structure, ::cpp2::SinkException2>> > SinkService_methodFinalThrow_presult; typedef apache::thrift::ThriftPresult SinkService_methodBothThrow_pargs; typedef apache::thrift::ThriftPResultSink< apache::thrift::ThriftPresult, apache::thrift::ThriftPresult, apache::thrift::FieldData<1, ::apache::thrift::type_class::structure, ::cpp2::SinkException1>>, apache::thrift::ThriftPresult, apache::thrift::FieldData<1, ::apache::thrift::type_class::structure, ::cpp2::SinkException2>> > SinkService_methodBothThrow_presult; typedef apache::thrift::ThriftPresult SinkService_methodFast_pargs; typedef apache::thrift::ThriftPResultSink< apache::thrift::ThriftPresult, apache::thrift::ThriftPresult>, apache::thrift::ThriftPresult> > SinkService_methodFast_presult; } // namespace cpp2 template void apache::thrift::Client<::cpp2::SinkService>::methodT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback) { ::cpp2::SinkService_method_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "method", ::apache::thrift::FunctionQualifier::Unspecified, "SinkService"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } template void apache::thrift::Client<::cpp2::SinkService>::methodAndReponseT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback) { ::cpp2::SinkService_methodAndReponse_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "methodAndReponse", ::apache::thrift::FunctionQualifier::Unspecified, "SinkService"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } template void apache::thrift::Client<::cpp2::SinkService>::methodThrowT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback) { ::cpp2::SinkService_methodThrow_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "methodThrow", ::apache::thrift::FunctionQualifier::Unspecified, "SinkService"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } template void apache::thrift::Client<::cpp2::SinkService>::methodSinkThrowT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback) { ::cpp2::SinkService_methodSinkThrow_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "methodSinkThrow", ::apache::thrift::FunctionQualifier::Unspecified, "SinkService"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } template void apache::thrift::Client<::cpp2::SinkService>::methodFinalThrowT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback) { ::cpp2::SinkService_methodFinalThrow_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "methodFinalThrow", ::apache::thrift::FunctionQualifier::Unspecified, "SinkService"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } template void apache::thrift::Client<::cpp2::SinkService>::methodBothThrowT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback) { ::cpp2::SinkService_methodBothThrow_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "methodBothThrow", ::apache::thrift::FunctionQualifier::Unspecified, "SinkService"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } template void apache::thrift::Client<::cpp2::SinkService>::methodFastT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback) { ::cpp2::SinkService_methodFast_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "methodFast", ::apache::thrift::FunctionQualifier::Unspecified, "SinkService"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } void apache::thrift::Client<::cpp2::SinkService>::methodImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { methodT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { methodT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::SinkService>::methodCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "SinkService.method", *header); return {std::move(ctx), std::move(header)}; } #if FOLLY_HAS_COROUTINES folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_method() { ::apache::thrift::RpcOptions rpcOptions; co_return co_await co_method(rpcOptions); } folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_method(apache::thrift::RpcOptions& rpcOptions) { const folly::CancellationToken& cancelToken = co_await folly::coro::co_current_cancellation_token; const bool cancellable = cancelToken.canBeCancelled(); apache::thrift::ClientReceiveState returnState; apache::thrift::ClientCoroCallback callback(&returnState, co_await folly::coro::co_current_executor); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto [ctx, header] = methodCtx(&rpcOptions); using CancellableCallback = apache::thrift::CancellableRequestClientCallback; auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr; auto wrappedCallback = apache::thrift::createSinkClientCallback( apache::thrift::RequestClientCallback::Ptr(apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback))); methodImpl(rpcOptions, std::move(header), ctx.get(), wrappedCallback); if (cancellable) { folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); }); co_await callback.co_waitUntilDone(); } else { co_await callback.co_waitUntilDone(); } if (returnState.isException()) { co_yield folly::coro::co_error(std::move(returnState.exception())); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctx)); co_return recv_method(returnState); } #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_wrapped_method(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::SinkService_method_presult; using ExMapType = apache::thrift::detail::ap::EmptyExMapType; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_method(::apache::thrift::ClientReceiveState& state) { apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> _return; auto ew = recv_wrapped_method(_return, state); if (ew) { ew.throw_exception(); } return _return; } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_instance_method(::apache::thrift::ClientReceiveState& state) { return recv_method(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_instance_wrapped_method(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_method(_return, state); } void apache::thrift::Client<::cpp2::SinkService>::methodAndReponseImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { methodAndReponseT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodAndReponseT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { methodAndReponseT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodAndReponseT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::SinkService>::methodAndReponseCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "SinkService.methodAndReponse", *header); return {std::move(ctx), std::move(header)}; } #if FOLLY_HAS_COROUTINES folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodAndReponse() { ::apache::thrift::RpcOptions rpcOptions; co_return co_await co_methodAndReponse(rpcOptions); } folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodAndReponse(apache::thrift::RpcOptions& rpcOptions) { const folly::CancellationToken& cancelToken = co_await folly::coro::co_current_cancellation_token; const bool cancellable = cancelToken.canBeCancelled(); apache::thrift::ClientReceiveState returnState; apache::thrift::ClientCoroCallback callback(&returnState, co_await folly::coro::co_current_executor); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto [ctx, header] = methodAndReponseCtx(&rpcOptions); using CancellableCallback = apache::thrift::CancellableRequestClientCallback; auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr; auto wrappedCallback = apache::thrift::createSinkClientCallback( apache::thrift::RequestClientCallback::Ptr(apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback))); methodAndReponseImpl(rpcOptions, std::move(header), ctx.get(), wrappedCallback); if (cancellable) { folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); }); co_await callback.co_waitUntilDone(); } else { co_await callback.co_waitUntilDone(); } if (returnState.isException()) { co_yield folly::coro::co_error(std::move(returnState.exception())); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctx)); co_return recv_methodAndReponse(returnState); } #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_wrapped_methodAndReponse(apache::thrift::ResponseAndClientSink<::cpp2::InitialResponse, ::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::SinkService_methodAndReponse_presult; using ExMapType = apache::thrift::detail::ap::EmptyExMapType; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } apache::thrift::ResponseAndClientSink<::cpp2::InitialResponse, ::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_methodAndReponse(::apache::thrift::ClientReceiveState& state) { apache::thrift::ResponseAndClientSink<::cpp2::InitialResponse, ::cpp2::SinkPayload, ::cpp2::FinalResponse> _return; auto ew = recv_wrapped_methodAndReponse(_return, state); if (ew) { ew.throw_exception(); } return _return; } apache::thrift::ResponseAndClientSink<::cpp2::InitialResponse, ::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_instance_methodAndReponse(::apache::thrift::ClientReceiveState& state) { return recv_methodAndReponse(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_instance_wrapped_methodAndReponse(apache::thrift::ResponseAndClientSink<::cpp2::InitialResponse, ::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_methodAndReponse(_return, state); } void apache::thrift::Client<::cpp2::SinkService>::methodThrowImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { methodThrowT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodThrowT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { methodThrowT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodThrowT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::SinkService>::methodThrowCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "SinkService.methodThrow", *header); return {std::move(ctx), std::move(header)}; } #if FOLLY_HAS_COROUTINES folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodThrow() { ::apache::thrift::RpcOptions rpcOptions; co_return co_await co_methodThrow(rpcOptions); } folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodThrow(apache::thrift::RpcOptions& rpcOptions) { const folly::CancellationToken& cancelToken = co_await folly::coro::co_current_cancellation_token; const bool cancellable = cancelToken.canBeCancelled(); apache::thrift::ClientReceiveState returnState; apache::thrift::ClientCoroCallback callback(&returnState, co_await folly::coro::co_current_executor); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto [ctx, header] = methodThrowCtx(&rpcOptions); using CancellableCallback = apache::thrift::CancellableRequestClientCallback; auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr; auto wrappedCallback = apache::thrift::createSinkClientCallback( apache::thrift::RequestClientCallback::Ptr(apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback))); methodThrowImpl(rpcOptions, std::move(header), ctx.get(), wrappedCallback); if (cancellable) { folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); }); co_await callback.co_waitUntilDone(); } else { co_await callback.co_waitUntilDone(); } if (returnState.isException()) { co_yield folly::coro::co_error(std::move(returnState.exception())); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctx)); co_return recv_methodThrow(returnState); } #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_wrapped_methodThrow(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::SinkService_methodThrow_presult; using ExMapType = apache::thrift::detail::ap::EmptyExMapType; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_methodThrow(::apache::thrift::ClientReceiveState& state) { apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> _return; auto ew = recv_wrapped_methodThrow(_return, state); if (ew) { ew.throw_exception(); } return _return; } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_instance_methodThrow(::apache::thrift::ClientReceiveState& state) { return recv_methodThrow(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_instance_wrapped_methodThrow(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_methodThrow(_return, state); } void apache::thrift::Client<::cpp2::SinkService>::methodSinkThrowImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { methodSinkThrowT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodSinkThrowT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { methodSinkThrowT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodSinkThrowT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::SinkService>::methodSinkThrowCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "SinkService.methodSinkThrow", *header); return {std::move(ctx), std::move(header)}; } #if FOLLY_HAS_COROUTINES folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodSinkThrow() { ::apache::thrift::RpcOptions rpcOptions; co_return co_await co_methodSinkThrow(rpcOptions); } folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodSinkThrow(apache::thrift::RpcOptions& rpcOptions) { const folly::CancellationToken& cancelToken = co_await folly::coro::co_current_cancellation_token; const bool cancellable = cancelToken.canBeCancelled(); apache::thrift::ClientReceiveState returnState; apache::thrift::ClientCoroCallback callback(&returnState, co_await folly::coro::co_current_executor); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto [ctx, header] = methodSinkThrowCtx(&rpcOptions); using CancellableCallback = apache::thrift::CancellableRequestClientCallback; auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr; auto wrappedCallback = apache::thrift::createSinkClientCallback( apache::thrift::RequestClientCallback::Ptr(apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback))); methodSinkThrowImpl(rpcOptions, std::move(header), ctx.get(), wrappedCallback); if (cancellable) { folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); }); co_await callback.co_waitUntilDone(); } else { co_await callback.co_waitUntilDone(); } if (returnState.isException()) { co_yield folly::coro::co_error(std::move(returnState.exception())); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctx)); co_return recv_methodSinkThrow(returnState); } #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_wrapped_methodSinkThrow(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::SinkService_methodSinkThrow_presult; struct ExMapType { bool operator()(typename result::SinkPResultType& res, folly::exception_wrapper ew) { if (ew.with_exception([&]( ::cpp2::SinkException1& e) { res.get<1>().ref() = e; res.setIsSet(1, true); })) { return true; } return false; } }; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_methodSinkThrow(::apache::thrift::ClientReceiveState& state) { apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> _return; auto ew = recv_wrapped_methodSinkThrow(_return, state); if (ew) { ew.throw_exception(); } return _return; } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_instance_methodSinkThrow(::apache::thrift::ClientReceiveState& state) { return recv_methodSinkThrow(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_instance_wrapped_methodSinkThrow(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_methodSinkThrow(_return, state); } void apache::thrift::Client<::cpp2::SinkService>::methodFinalThrowImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { methodFinalThrowT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodFinalThrowT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { methodFinalThrowT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodFinalThrowT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::SinkService>::methodFinalThrowCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "SinkService.methodFinalThrow", *header); return {std::move(ctx), std::move(header)}; } #if FOLLY_HAS_COROUTINES folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodFinalThrow() { ::apache::thrift::RpcOptions rpcOptions; co_return co_await co_methodFinalThrow(rpcOptions); } folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodFinalThrow(apache::thrift::RpcOptions& rpcOptions) { const folly::CancellationToken& cancelToken = co_await folly::coro::co_current_cancellation_token; const bool cancellable = cancelToken.canBeCancelled(); apache::thrift::ClientReceiveState returnState; apache::thrift::ClientCoroCallback callback(&returnState, co_await folly::coro::co_current_executor); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto [ctx, header] = methodFinalThrowCtx(&rpcOptions); using CancellableCallback = apache::thrift::CancellableRequestClientCallback; auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr; auto wrappedCallback = apache::thrift::createSinkClientCallback( apache::thrift::RequestClientCallback::Ptr(apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback))); methodFinalThrowImpl(rpcOptions, std::move(header), ctx.get(), wrappedCallback); if (cancellable) { folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); }); co_await callback.co_waitUntilDone(); } else { co_await callback.co_waitUntilDone(); } if (returnState.isException()) { co_yield folly::coro::co_error(std::move(returnState.exception())); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctx)); co_return recv_methodFinalThrow(returnState); } #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_wrapped_methodFinalThrow(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::SinkService_methodFinalThrow_presult; using ExMapType = apache::thrift::detail::ap::EmptyExMapType; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_methodFinalThrow(::apache::thrift::ClientReceiveState& state) { apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> _return; auto ew = recv_wrapped_methodFinalThrow(_return, state); if (ew) { ew.throw_exception(); } return _return; } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_instance_methodFinalThrow(::apache::thrift::ClientReceiveState& state) { return recv_methodFinalThrow(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_instance_wrapped_methodFinalThrow(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_methodFinalThrow(_return, state); } void apache::thrift::Client<::cpp2::SinkService>::methodBothThrowImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { methodBothThrowT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodBothThrowT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { methodBothThrowT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodBothThrowT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::SinkService>::methodBothThrowCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "SinkService.methodBothThrow", *header); return {std::move(ctx), std::move(header)}; } #if FOLLY_HAS_COROUTINES folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodBothThrow() { ::apache::thrift::RpcOptions rpcOptions; co_return co_await co_methodBothThrow(rpcOptions); } folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodBothThrow(apache::thrift::RpcOptions& rpcOptions) { const folly::CancellationToken& cancelToken = co_await folly::coro::co_current_cancellation_token; const bool cancellable = cancelToken.canBeCancelled(); apache::thrift::ClientReceiveState returnState; apache::thrift::ClientCoroCallback callback(&returnState, co_await folly::coro::co_current_executor); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto [ctx, header] = methodBothThrowCtx(&rpcOptions); using CancellableCallback = apache::thrift::CancellableRequestClientCallback; auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr; auto wrappedCallback = apache::thrift::createSinkClientCallback( apache::thrift::RequestClientCallback::Ptr(apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback))); methodBothThrowImpl(rpcOptions, std::move(header), ctx.get(), wrappedCallback); if (cancellable) { folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); }); co_await callback.co_waitUntilDone(); } else { co_await callback.co_waitUntilDone(); } if (returnState.isException()) { co_yield folly::coro::co_error(std::move(returnState.exception())); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctx)); co_return recv_methodBothThrow(returnState); } #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_wrapped_methodBothThrow(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::SinkService_methodBothThrow_presult; struct ExMapType { bool operator()(typename result::SinkPResultType& res, folly::exception_wrapper ew) { if (ew.with_exception([&]( ::cpp2::SinkException1& e) { res.get<1>().ref() = e; res.setIsSet(1, true); })) { return true; } return false; } }; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_methodBothThrow(::apache::thrift::ClientReceiveState& state) { apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> _return; auto ew = recv_wrapped_methodBothThrow(_return, state); if (ew) { ew.throw_exception(); } return _return; } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_instance_methodBothThrow(::apache::thrift::ClientReceiveState& state) { return recv_methodBothThrow(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_instance_wrapped_methodBothThrow(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_methodBothThrow(_return, state); } void apache::thrift::Client<::cpp2::SinkService>::methodFastImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::SinkClientCallback* callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { methodFastT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodFastT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { methodFastT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { methodFastT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::SinkService>::methodFastCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "SinkService.methodFast", *header); return {std::move(ctx), std::move(header)}; } #if FOLLY_HAS_COROUTINES folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodFast() { ::apache::thrift::RpcOptions rpcOptions; co_return co_await co_methodFast(rpcOptions); } folly::coro::Task> apache::thrift::Client<::cpp2::SinkService>::co_methodFast(apache::thrift::RpcOptions& rpcOptions) { const folly::CancellationToken& cancelToken = co_await folly::coro::co_current_cancellation_token; const bool cancellable = cancelToken.canBeCancelled(); apache::thrift::ClientReceiveState returnState; apache::thrift::ClientCoroCallback callback(&returnState, co_await folly::coro::co_current_executor); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto [ctx, header] = methodFastCtx(&rpcOptions); using CancellableCallback = apache::thrift::CancellableRequestClientCallback; auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr; auto wrappedCallback = apache::thrift::createSinkClientCallback( apache::thrift::RequestClientCallback::Ptr(apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback))); methodFastImpl(rpcOptions, std::move(header), ctx.get(), wrappedCallback); if (cancellable) { folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); }); co_await callback.co_waitUntilDone(); } else { co_await callback.co_waitUntilDone(); } if (returnState.isException()) { co_yield folly::coro::co_error(std::move(returnState.exception())); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctx)); co_return recv_methodFast(returnState); } #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_wrapped_methodFast(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::SinkService_methodFast_presult; using ExMapType = apache::thrift::detail::ap::EmptyExMapType; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, state.extractSink(), _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_methodFast(::apache::thrift::ClientReceiveState& state) { apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> _return; auto ew = recv_wrapped_methodFast(_return, state); if (ew) { ew.throw_exception(); } return _return; } apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse> apache::thrift::Client<::cpp2::SinkService>::recv_instance_methodFast(::apache::thrift::ClientReceiveState& state) { return recv_methodFast(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::SinkService>::recv_instance_wrapped_methodFast(apache::thrift::ClientSink<::cpp2::SinkPayload, ::cpp2::FinalResponse>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_methodFast(_return, state); }