Skip to main content

Crate fastapi_router

Crate fastapi_router 

Source
Expand description

Trie-based HTTP router.

This crate provides a high-performance radix trie router optimized for the fastapi_rust framework.

§Features

  • Radix trie for fast lookups
  • Path parameter extraction (/items/{id})
  • Type-safe path converters
  • Static route optimization

Structs§

AllowedMethods
Allowed methods for a matched path.
InvalidRouteError
Error returned when a route path is invalid.
ParamInfo
Path parameter information with optional OpenAPI metadata.
Route
A route definition used for routing and (optionally) metadata.
RouteConflictError
Error returned when a new route conflicts with an existing one.
RouteMatch
A matched route with extracted parameters.
RouteRegistration
A route registration entry placed in a linker section.
Router
Radix trie router.

Enums§

ConversionError
Error type for parameter conversion failures.
Converter
Path parameter type converter.
ParamValue
A type-converted path parameter value.
RouteAddError
Error returned when adding a route fails.
RouteLookup
Result of attempting to locate a route by path and method.

Functions§

registered_routes
Return all routes registered via the link-section table.