GrpcServerStreamReply
struct GrpcServerStreamReplyTyped return value for a server-streaming gRPC handler.
messages is the ordered list of response bodies the handler
yields; each becomes one LPM frame on the wire. status is the
final call outcome (OK or a typed error) carried on the trailers,
and trailing_metadata is the optional application trailer set.
A non-OK status SHOULD ship an empty messages list -- a stream
that fails mid-way still carries whatever it already yielded plus
the error trailer, but the two factory methods keep the common
"all messages then OK" / "no messages, just an error" shapes
one-liners.
Implements Copyable, Movable
- Fields
messages: List[List[UInt8]]status: GrpcStatustrailing_metadata: GrpcMetadatacompress: Bool: Whether these messages may be compressed, when the client accepts it.
ok
def ok(var messages: List[List[UInt8]], var trailing_metadata: GrpcMetadata = GrpcMetadata(), compress: Bool = True) -> Self Build an OK server-streaming reply yielding messages.
err
def err(var status: GrpcStatus, var trailing_metadata: GrpcMetadata = GrpcMetadata()) -> Self Build a non-OK reply: no messages, just the error trailer.