Function callback_layer

Source
pub fn callback_layer<F>(callback: F) -> CallbackLayer
where F: Fn(&Event<'_>) + Send + Sync + 'static,
Expand description

Returns a simple callback layer that will call the provided callback on each relevant event.