Skip to main content

Module route_table

Module route_table 

Source
Expand description

Process-global table of the application’s routes.

The routes! macro registers every (method, path) it expands via register_routes as the router is built. Because the generated app builds its router (routes::router()) before handing it to the CLI, the table is populated by the time doido server or doido routes runs — letting both print the route list without introspecting axum’s opaque Router.

Structs§

RouteEntry
One registered route (or method group) of the application.

Functions§

all_routes
Returns a snapshot of the registered routes, in declaration order.
format_routes
Renders the route table as aligned METHOD PATH lines.
print_routes
Prints the route table to stdout. This is the doido routes command’s primary data output (like ls listing files), so it is written directly rather than through the logger. Server startup logs the table via tracing instead — see format_routes.
register_routes
Records the application’s routes, replacing any previously registered set. Called by routes!-generated code.