/// Crate a new Runner with the provided dispatcher and rate limiter
///
/// # Returns
/// This returns the [`Runner`] and a [`Control`] type that'll let you interact with the Runner.
///
/// [`Runner`]: ./struct.Runner.html
/// [`Control`]: ./struct.Control.html
///
Crate a new Runner with the provided dispatcher and rate limiter
Crate a new Runner with the provided dispatcher and rate limiter
pub fn new_with_rate_limit(dispatcher: Dispatcher, rate_limit: RateLimit) -> (Runner, Control) {
        let (sender, receiver) = mpsc::channel(64);
        let stop = abort::Abort::default();
        let writer = Writer::new(writer::MpscWriter::new(sender))
            .with_rate_limiter(Arc::new(Mutex::new(rate_limit)));
        let ready = Arc::new(tokio::sync::Notify::default());
        let this = Self {
            dispatcher,
            receiver,
            abort: stop.clone(),
            writer: writer.clone(),
            ready: ready.clone(),
        };
        let control = Control {
            writer,
            stop,
            ready,
        };
        (this, control)
    }
pub fn new_with_rate_limit ( dispatcher : Dispatcher , rate_limit : RateLimit ) -> ( Runner , Control ) { let ( sender , receiver ) = mpsc :: channel ( 64 ) ; let stop = abort :: Abort :: default ( ) ; let writer = Writer :: new ( writer :: MpscWriter :: new ( sender ) ) . with_rate_limiter ( Arc :: new ( Mutex :: new ( rate_limit ) ) ) ; let ready = Arc :: new ( tokio :: sync :: Notify :: default ( ) ) ; let this = Self { dispatcher , receiver , abort : stop . clone ( ) , writer : writer . clone ( ) , ready : ready . clone ( ) , } ; let control = Control { writer , stop , ready , } ; ( this , control ) }
Crate a new Runner with the provided dispatcher and rate limiter
Crate a new Runner with the provided dispatcher and rate limiter
This returns the [`Runner`] and a [`Control`] type that'll let you interact with the Runner.

[`Runner`]: ./struct.Runner.html
[`Control`]: ./struct.Control.html
This returns the [ ` Runner ` ] and a [ ` Control ` ] type that ' ll let you interact with the Runner . [ ` Runner ` ] : . / struct . Runner . html [ ` Control ` ] : . / struct . Control . html
dispatcher
Dispatcher
rate_limit
RateLimit