create_streaming_parser

Function create_streaming_parser 

Source
pub fn create_streaming_parser(platform: Platform) -> Box<dyn Parser>
Expand description

Creates a parser for the specified platform with streaming support.

This creates a parser configured for optimal streaming performance. All platforms now support streaming.

§Example

use chatpack::parser::{Platform, create_streaming_parser};

let parser = create_streaming_parser(Platform::Telegram);
for result in parser.stream("large_file.json".as_ref())? {
    // Process each message
}

§Panics

Panics if the corresponding parser feature is not enabled.