Function transportation::insert_listener[][src]

pub fn insert_listener(
    listener: impl Fn(Event) + 'static
) -> usize

Insert a listener and return a unique usize value that can be used to register one or more Eventeds with the internal poll for this thread. Note: this callback will never be called unless borrow_poll(|poll| poll.register()) is called with the returned token.