pub fn handler_fn<F, Fut>(f: F) -> BoxHandlerExpand description
Creates a BoxHandler from any async function or closure.
§Example
ⓘ
use rustigram_bot::{handler_fn, Context, BotResult};
let h = handler_fn(|ctx: Context| async move {
if let Some(r) = ctx.reply("pong") { r.await?; }
Ok(())
});