callback

Macro callback 

Source
macro_rules! callback {
    (
    $( #[$attr:meta] )* // includes doc strings
    $pub:vis
    async
    fn $fname:ident( $($args:tt)* ) $(-> $Ret:ty)?
    {
        $($body:tt)*
    }
) => { ... };
}
Expand description

Macro to transform async fn to return Pin<Box<impl Future<Output=T>>> instead of impl Future<Output=T> and is required for functions which are planned to be passed as an argument to Bot::on_talk or similar methods.

Stolen from here , thanks to Yandros.