Skip to main content

auto_route_count

Function auto_route_count 

Source
pub fn auto_route_count() -> usize
Expand description

Get the count of auto-registered routes without collecting them.

This is useful for:

  • Debugging (e.g. in tests or startup logs)
  • Asserting that your annotated handlers were actually linked in

§Example

let count = rustapi_core::auto_route_count();
if count == 0 {
    eprintln!("Warning: No auto-routes were discovered!");
}