userver: ugrpc::client::StreamReadFuture< Response > Class Template Reference
Loading...
Searching...
No Matches
ugrpc::client::StreamReadFuture< Response > Class Template Reference

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

Detailed Description

template<typename Response>
class ugrpc::client::StreamReadFuture< Response >

StreamReadFuture for waiting a single read response from stream.

Definition at line 17 of file stream_read_future.hpp.

Public Member Functions

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

Member Function Documentation

◆ Get()

template<typename Response>
bool ugrpc::client::StreamReadFuture< Response >::Get ( )
inline

Await response.

Upon completion the result is available in response that was specified when initiating the asynchronous read

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

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

Definition at line 36 of file stream_read_future.hpp.

◆ IsReady()

template<typename Response>
bool ugrpc::client::StreamReadFuture< Response >::IsReady ( ) const
inlinenodiscard

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

Returns
true if result ready

Definition at line 25 of file stream_read_future.hpp.


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