userver: grpc_proto_structs::client::Reader< StructsResponse > Class Template Reference
Loading...
Searching...
No Matches
grpc_proto_structs::client::Reader< StructsResponse > Class Template Referencefinal

#include </data/code/userver/libraries/grpc-proto-structs/include/userver/grpc-proto-structs/client/stream.hpp>

Detailed Description

template<typename StructsResponse>
class grpc_proto_structs::client::Reader< StructsResponse >

proto-struct based Reader adapter.

Definition at line 18 of file stream.hpp.

Public Types

using ProtobufResponse = proto_structs::traits::CompatibleMessageType<StructsResponse>
 
using ProtobufReader = ugrpc::client::Reader<ProtobufResponse>
 

Public Member Functions

 Reader (ProtobufReader &&reader)
 
 Reader (Reader &&)=default
 
Readeroperator= (Reader &&)=default
 
std::optional< StructsResponse > Read ()
 Await and read the next incoming message.
 
ugrpc::client::CallContextGetContext ()
 Get call context, useful e.g. for accessing metadata.
 
const ugrpc::client::CallContextGetContext () const
 

Member Typedef Documentation

◆ ProtobufReader

template<typename StructsResponse>
using grpc_proto_structs::client::Reader< StructsResponse >::ProtobufReader = ugrpc::client::Reader<ProtobufResponse>

Definition at line 21 of file stream.hpp.

◆ ProtobufResponse

template<typename StructsResponse>
using grpc_proto_structs::client::Reader< StructsResponse >::ProtobufResponse = proto_structs::traits::CompatibleMessageType<StructsResponse>

Definition at line 20 of file stream.hpp.

Constructor & Destructor Documentation

◆ Reader()

template<typename StructsResponse>
grpc_proto_structs::client::Reader< StructsResponse >::Reader ( ProtobufReader< StructsResponse > && reader)
inlineexplicit

Definition at line 23 of file stream.hpp.

Member Function Documentation

◆ GetContext() [1/2]

template<typename StructsResponse>
ugrpc::client::CallContext & grpc_proto_structs::client::Reader< StructsResponse >::GetContext ( )
inline

Get call context, useful e.g. for accessing metadata.

See also
ugrpc::client::Reader::GetContext.

Definition at line 46 of file stream.hpp.

◆ GetContext() [2/2]

template<typename StructsResponse>
const ugrpc::client::CallContext & grpc_proto_structs::client::Reader< StructsResponse >::GetContext ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
ugrpc::client::Reader::GetContext.

Definition at line 51 of file stream.hpp.

◆ Read()

template<typename StructsResponse>
std::optional< StructsResponse > grpc_proto_structs::client::Reader< StructsResponse >::Read ( )
inlinenodiscard

Await and read the next incoming message.

Read protobuf message corresponding to Response with ugrpc::client::Reader::Read and construct response from it.

Definition at line 32 of file stream.hpp.


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