16class ResponseFuture final {
18 using VanillaResponse = proto_structs::traits::CompatibleMessageType<Response>;
19 using VanillaFuture = ugrpc::client::ResponseFuture<VanillaResponse>;
21 explicit ResponseFuture(VanillaFuture&& future)
22 : future_{std::move(future)}
28 [[nodiscard]]
bool IsReady()
const {
return future_.IsReady(); }
34 return future_.WaitUntil(deadline);
46 Response
Get() {
return proto_structs::MessageToStruct<Response>(future_.Get()); }
49 void Cancel() {
return future_.Cancel(); }
58 VanillaFuture future_;