Macro axum_debug_macros::debug_router[][src]

debug_router!() { /* proc-macro */ }
Expand description

Shortens error message when applied to a Router.

Example

use axum::{handler::get, Router};
use axum_debug::{debug_handler, debug_router};

#[tokio::main]
async fn main() {
    let app = Router::new().route("/", get(handler));

    debug_router!(app);

    axum::Server::bind(&"0.0.0.0:3000".parse().unwrap())
        .serve(app.into_make_service())
        .await
        .unwrap();
}

#[debug_handler]
async fn handler() -> bool {
    false
}