17class ResponseFuture final {
19 using VanillaResponse = proto_structs::traits::CompatibleMessageType<Response>;
20 using VanillaFuture = ugrpc::client::ResponseFuture<VanillaResponse>;
22 explicit ResponseFuture(VanillaFuture&& future)
23 : future_{std::move(future)}
29 [[nodiscard]]
bool IsReady()
const {
return future_.IsReady(); }
35 return future_.WaitUntil(deadline);
47 Response
Get() {
return proto_structs::MessageToStruct<Response>(future_.Get()); }
50 void Cancel() {
return future_.Cancel(); }
60 return future_.GetAwaitableToken();
64 VanillaFuture future_;