Skip to main content

EventHandlerFunc

Type Alias EventHandlerFunc 

Source
pub type EventHandlerFunc = fn(Context, Update) -> Pin<Box<dyn Future<Output = ()> + Send>>;
Expand description

A function that handles a new update, it receives a Context and Update and returns a pinned future. Wrap an async function with #[prepare_listener] for easier development.