pub async fn axum<R>(
    bot: R,
    options: Options
) -> Result<impl UpdateListener<Err = Infallible>, R::Err>where
    R: Requester + Send + 'static,
    <R as Requester>::DeleteWebhook: Send,
Available on crate features webhooks-axum and webhooks only.
Expand description

Webhook implementation based on the axum framework.

This function does all the work necessary for webhook to work, it:

Panics

If binding to the address fails.

Fails

If set_webhook() fails.

See also

axum_to_router and axum_no_setup for lower-level versions of this function.