Function from_fn

Source
pub const fn from_fn<F>(f: F) -> FromFn<F>
where F: Fn(Event<'_, &dyn ErasedProps>),
Expand description

Create an Emitter from a function.

The input function is assumed not to perform any background work that needs flushing.