Expand description
Per-call helpers used by the generated REST client.
The macro keeps emitted code small by funnelling the common
“send unary request and decode the response” path through
send_unary, and the streaming path through
send_streaming.
Structs§
- Stream
Request - A configured streaming request, ready to be opened.
Traits§
- Stream
Request Factory - Builder for a streaming request that can be re-issued on reconnect.
Functions§
- build_
default_ http_ client - Non-
otelbuild ofbuild_default_http_client: RED metrics (.with_metrics) are NOT compiled in — that builder method only exists undertoolkit-http/otel.client_typeis unused in this configuration..with_otel()is still called (see the doc on theotel-cfg sibling above): whether it actually propagatestraceparentdepends on whethertoolkit-http/otelends up enabled by some crate in the build, not on this crate’s ownotelfeature. - open_
streaming - Open a stream eagerly: connect, check the response status, and perform
the framing’s own setup before returning, so an open-time failure is an
Errfrom this call rather than the returned stream’s first item. - send_
streaming - Send a streaming request and adapt the response into a typed stream, with the open deferred until the stream is first polled.
- send_
unary - Send a unary request and decode the JSON response.
- with_
json_ body - Add a JSON body to a request builder. Wraps
toolkit_http’s fallible.json()(which can fail to serialize) in ourTransportErrorsurface so the macro emit path can?uniformly.