/// Inserts a new event source in the loop.
///
/// The provided callback will be called during the dispatching cycles whenever the
/// associated source generates events, see `EventLoop::dispatch(..)` for details.
///
/// This function takes ownership of the event source. Use `register_dispatcher`
/// if you need access to the event source after this call.
Inserts a new event source in the loop.
The provided callback will be called during the dispatching cycles whenever the
associated source generates events, see `EventLoop::dispatch(..)` for details.

This function takes ownership of the event source. Use `register_dispatcher`
if you need access to the event source after this call.
Inserts a new event source in the loop . The provided callback will be called during the dispatching cycles whenever the associated source generates events see ` EventLoop :: dispatch ( .. ) ` for details . This function takes ownership of the event source . Use ` register_dispatcher ` if you need access to the event source after this call .
pub fn insert_source<S, F>(
        &self,
        source: S,
        callback: F,
    ) -> Result<RegistrationToken, InsertError<S>>
    where
        S: EventSource + 'l,
        F: FnMut(S::Event, &mut S::Metadata, &mut Data) -> S::Ret + 'l,
    {
        let dispatcher = Dispatcher::new(source, callback);
        self.register_dispatcher(dispatcher.clone())
            .map_err(|error| InsertError {
                error,
                source: dispatcher.into_source_inner(),
            })
    }
pub fn insert_source < S , F > ( & self , source : S , callback : F , ) -> Result < RegistrationToken , InsertError < S > > where S : EventSource + ' l , F : FnMut ( S :: Event , & mut S :: Metadata , & mut Data ) -> S :: Ret + ' l , { let dispatcher = Dispatcher :: new ( source , callback ) ; self . register_dispatcher ( dispatcher . clone ( ) ) . map_err ( | error | InsertError { error , source : dispatcher . into_source_inner ( ) , } ) }
Inserts a new event source in the loop.
Inserts a new event source in the loop .
&self
source
S
callback
F