#include <userver/ugrpc/server/result.hpp>
Special result type for server-streaming service handlers.
Provides a way to return one of:
For non-server-streaming RPCs, see ugrpc::server::Result.
Definition at line 117 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 |
Static Public Member Functions | |
| static StreamingResult | BorrowArenaResponse (Response &response) |
| Construct a successful result that borrows an arena-backed last response. | |
|
inline |
Construct from grpc::Status (which can be OK or an error status).
Definition at line 120 of file result.hpp.
|
inline |
Construct from grpc::Status (which can be OK or an error status).
Definition at line 125 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 130 of file result.hpp.
|
inlinestatic |
Construct a successful result that borrows an arena-backed last response.
| response | A protobuf message allocated on an arena. |
Definition at line 139 of file result.hpp.
|
inline |
Definition at line 161 of file result.hpp.
|
inline |
Definition at line 148 of file result.hpp.
|
inline |
Definition at line 168 of file result.hpp.
|
inline |
Definition at line 151 of file result.hpp.
|
inline |
Definition at line 154 of file result.hpp.
|
inline |
Definition at line 145 of file result.hpp.