userver: ugrpc::client::UnaryFuture Class Reference
Loading...
Searching...
No Matches
ugrpc::client::UnaryFuture Class Reference

UnaryFuture for waiting a single response RPC. More...

#include <userver/ugrpc/client/rpc.hpp>

Public Member Functions

 UnaryFuture (UnaryFuture &&) noexcept=default
 
UnaryFutureoperator= (UnaryFuture &&) noexcept
 
void Get ()
 Await response.
 
bool IsReady () const noexcept
 Checks if the asynchronous call has completed Note, that once user gets result, IsReady should not be called.
 

Detailed Description

UnaryFuture for waiting a single response RPC.

Definition at line 31 of file rpc.hpp.

Member Function Documentation

◆ Get()

void ugrpc::client::UnaryFuture::Get ( )

Await response.

Upon completion result is available in response when initiating the asynchronous operation, e.g. FinishAsync.

Get should not be called multiple times for the same UnaryFuture.

Exceptions
ugrpc::client::RpcErroron an RPC error
ugrpc::client::RpcCancelledErroron task cancellation

◆ IsReady()

bool ugrpc::client::UnaryFuture::IsReady ( ) const
noexcept

Checks if the asynchronous call has completed Note, that once user gets result, IsReady should not be called.

Returns
true if result ready

The documentation for this class was generated from the following file: