#include <userver/ugrpc/client/rpc.hpp>
UnaryFuture for waiting a single response RPC.
Public Member Functions | |
| UnaryFuture (UnaryFuture &&) noexcept=default | |
| UnaryFuture & | operator= (UnaryFuture &&) noexcept |
| UnaryFuture (const UnaryFuture &)=delete | |
| UnaryFuture & | operator= (const UnaryFuture &)=delete |
| void | Get () |
| Await response. | |
| engine::FutureStatus | Get (engine::Deadline deadline) |
| Await response until specified timepoint. | |
| bool | IsReady () const noexcept |
| Checks if the asynchronous call has completed Note, that once user gets result, IsReady should not be called. | |
| 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.
| ugrpc::client::RpcError | on an RPC error |
| ugrpc::client::RpcCancelledError | on task cancellation |
| engine::FutureStatus ugrpc::client::UnaryFuture::Get | ( | engine::Deadline | deadline | ) |
Await response until specified timepoint.
Once kReady is returned, result is available in response when initiating the asynchronous operation, e.g. FinishAsync.
In case of 'kReady/kCancelled' answer or exception Get should not be called anymore.
| ugrpc::client::RpcError | on an RPC error |
|
noexcept |
Checks if the asynchronous call has completed Note, that once user gets result, IsReady should not be called.