Skip to main content

Module client

Module client 

Source
Available on crate feature client only.
Expand description

The client half of trillium-grpc.

A generated <Service>Client wraps a trillium_client::Client and exposes one method per RPC. Each returns a typed, shape-specific call handle — UnaryConn, StreamingConn, or BidiConn — built on the GrpcClientConn engine: configure it with chainable with_* setters, then .await and/or iterate it to run the call and read the response, its initial metadata, and its grpc-status trailers. Per-client configuration (compression, deadlines) lives on ServiceClientExt.

Structs§

BidiConn
A full-duplex bidirectional call: send and receive messages interleaved over one live stream.
CancelHandle
A cheaply-cloneable, Send handle that cancels its GrpcClientConn from anywhere — including before a blocking call, or after N responses. Cancelling makes the in-flight (or next) send/recv resolve Cancelled and resets the underlying stream.
GrpcClientConn
An owned, typed gRPC client call.
StreamingConn
A server-streaming call: one request in, a stream of responses out.
UnaryConn
A unary or client-streaming call: one request (or a stream of requests) in, exactly one response out.

Traits§

ServiceClient
Generated <Service>Client newtypes implement this so extension traits can configure the underlying trillium_client::Client.
ServiceClientExt
Builder-style configuration available on every service client. Implemented for any T: ServiceClient + Sized, so service clients don’t reimplement these — they just impl ServiceClient and inherit the full set.

Functions§

with_service_prefix
Append a service-prefix segment to the client’s base URL. Used by generated From<trillium_client::Client> impls so that each generated method only needs to specify its own RPC name as a relative path.