Skip to main content

stream_document

Function stream_document 

Source
pub fn stream_document(
    parts: DocumentParts,
    streaming: bool,
) -> impl Stream<Item = String> + Send
Expand description

Render a complete document as a stream of chunks.

With streaming = false, all async content is resolved first and the stream yields exactly one chunk (used for bots, static generation and when streaming is disabled).