pub fn once<S, E, T, F>(f: F) -> impl Handler<S, E, Output = T>
Expand description
Constructs an event handler from a FnOnce
that only executes once.
The event handler executes the given function upon receiving its first call and always matches
the event. After this occurs, the function has been consumed and the adapter always returns
Handled::Unmatched
.