Skip to main content

from_async_reader_multi_with_config

Function from_async_reader_multi_with_config 

Source
pub async fn from_async_reader_multi_with_config<R, T>(
    reader: &mut R,
    config: &ParserConfig,
) -> Result<Vec<T>>
where R: AsyncRead + Unpin, T: DeserializeOwned + 'static,
Expand description

from_async_reader_multi with a caller-supplied ParserConfig. The reader is bounded by ParserConfig::max_stream_bytes. Every split document is then bounded independently by ParserConfig::max_document_length.

Uses crate::from_slice_with_config on the buffered bytes when only one document is present; otherwise routes through the standard multi-document loader so all per-document semantics (duplicate-key policy, anchor budgets, …) match crate::load_all_with_config.

§Errors

Returns the underlying Error from either the I/O drain (including bounded-read overflow and UTF-8 invalidity) or the parse step.