Skip to main content

create_chunked_stream

Function create_chunked_stream 

Source
pub fn create_chunked_stream<R>(
    initial_buffer: Vec<u8>,
    reader: R,
    config: &StreamingBodyConfig,
) -> Body
where R: AsyncRead + Unpin + Send + Sync + 'static,
Expand description

Create a streaming body from a chunked transfer-encoded body.

Returns a fastapi_core::Body::Stream that yields decoded chunks.

ยงArguments

  • initial_buffer - Any bytes already buffered by the parser
  • reader - The async reader for remaining bytes
  • config - Streaming configuration