pub fn channel<Event: Send + 'static>() -> (impl Fn(Event) + Send + Sync + 'static, Receiver<Event>)Expand description
A callback that forwards events into a channel, and the receiving end.
let (forward, requests) = qaros::channel();
let _subscription = session.subscribe_render_requests(forward)?;
let first_request = requests.recv();