You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/lol-html/src/transform_stream
    
    the code of the file until where you have to start completion: mod dispatcher;

use self::dispatcher::Dispatcher;
use crate::base::SharedEncoding;
use crate::memory::{Arena, SharedMemoryLimiter};
use crate::parser::{Parser, ParserDirective, SharedAttributeBuffer};
use crate::rewriter::RewritingError;
use std::cell::RefCell;
use std::rc::Rc;

pub use self::dispatcher::{
    AuxStartTagInfo, DispatcherEr
    
    pub fn new(settings: TransformStreamSettings<C, O>) -> Self {
        let initial_parser_directive = if settings
            .transform_controller
            .initial_capture_flags()
            .is_empty()
        {
            ParserDirective::WherePossibleScanForTagsOnly
        } else {
            ParserDirective::Lex
        };

        let dispatcher = Rc::new(RefCell::new(Dispatcher::new(
            settings.transform_controller,
            settings.output_sink,
            settings.encoding,
        )));

        let buffer = Arena::new(
            settings.memory_limiter,
            settings.preallocated_parsing_buffer_size,
        );

        let parser = Parser::new(&dispatcher, initial_parser_directive, settings.strict);

        TransformStream {
            dispatcher,
            parser,
            buffer,
            has_buffered_data: false,
        }
    }