Expand description
Streaming response types for the Corrosion HTTP API.
Each long-running endpoint exposes a dedicated Stream implementation:
QueryStream— one-shot query results (POST /v1/queries).SubscriptionStream— resumable live subscription (POST /v1/subscriptions); transparently reconnects with the last observedChangeIdon transient I/O errors.UpdatesStream— table-level update feed (POST /v1/updates/{table}).
All three decode JSON-lines responses through the LinesBytesCodec
defined here, which is a port of tokio-util’s LinesCodec adapted to
emit bytes::BytesMut frames.
Structs§
- IoBody
Stream - Adapter that exposes a
reqwest::Bodyas aStreamofio::Result<Bytes>, mapping framing errors intoio::Errorso the underlyingStreamReadercan consume them. - Lines
Bytes Codec LinesBytesCodecused to to split up bytes into lines. It uses the\ncharacter as the line delimiter.- Query
Stream - Stream returned by
crate::CorrosionApiClient::query_typedfor a single query. - Subscription
Stream - Live subscription stream returned by
crate::CorrosionApiClient::subscribe_typed. - Updates
Stream - Stream returned by
crate::CorrosionApiClient::updates_typed.
Enums§
- Query
Error - Errors yielded by
QueryStream. - Subscription
Error - Errors yielded by
SubscriptionStream. - Updates
Error - Errors yielded by
UpdatesStream.