Skip to main content

Module streaming

Module streaming 

Source
Expand description

Streaming response support

This module provides functionality to stream large JSON responses instead of loading them entirely into memory.

Structs§

JsonArrayStream
A stream that yields JSON array elements one at a time.

Functions§

should_stream
Check if a response body should be streamed based on size and configuration.
stream_json_array
Stream a JSON array by parsing the body string and streaming it chunk by chunk.
stream_json_array_from_values
Stream a vector of JSON values as a JSON array.
stream_json_response
Stream a JSON array response with proper formatting.