#include <userver/ugrpc/server/result.hpp>
Special result type for server-streaming service handlers.
Provides a way to return one of:
grpc::Status::OK
;grpc::Status
;grpc::Status::OK
, sent in a single batch.For non-server-streaming RPCs, see ugrpc::server::Result.
Definition at line 84 of file result.hpp.
Public Member Functions | |
StreamingResult (grpc::Status &&status) | |
Construct from grpc::Status (which can be OK or an error status). | |
StreamingResult (const grpc::Status &status) | |
Construct from grpc::Status (which can be OK or an error status). | |
StreamingResult (Response &&last_response) | |
Construct from last response. Allows to send last response and OK status coalesced in a single batch. | |
bool | IsSuccess () const |
grpc::Status && | ExtractStatus () |
const grpc::Status & | GetStatus () const |
bool | HasLastResponse () const |
Response && | ExtractLastResponse () |
const Response & | GetLastResponse () const |
|
inline |
Construct from grpc::Status
(which can be OK
or an error status).
Definition at line 87 of file result.hpp.
|
inline |
Construct from grpc::Status
(which can be OK
or an error status).
Definition at line 90 of file result.hpp.
|
inline |
Construct from last response. Allows to send last response and OK
status coalesced in a single batch.
Definition at line 93 of file result.hpp.
|
inline |
HasLastResponse() == true
. Definition at line 109 of file result.hpp.
|
inline |
OK
or an error status. Definition at line 99 of file result.hpp.
|
inline |
HasLastResponse() == true
. Definition at line 116 of file result.hpp.
|
inline |
OK
or an error status. Definition at line 102 of file result.hpp.
|
inline |
true
iff the StreamingResult
contains last response, which implies OK
status. Definition at line 105 of file result.hpp.
|
inline |
true
iff the StreamingResult
contains OK
status, possibly with a last response. Definition at line 96 of file result.hpp.