Skip to main content

Crate reinhardt_urls

Crate reinhardt_urls 

Source
Expand description

URL routing and proxy utilities for Reinhardt framework.

This crate provides URL routing, pattern matching, and proxy functionality for the Reinhardt web framework. It is a unified interface over the following internal crates:

  • reinhardt-routers: URL routing and pattern matching with middleware support
  • reinhardt-routers-macros: Compile-time URL validation macros
  • reinhardt-proxy: Lazy relationship loading for ORM

§Features

§HTTP Method Dispatch

On native targets, routers::ServerRouter forwards every HTTP method to raw handlers and class-based views, including HEAD, OPTIONS, and extension methods. Endpoints registered with EndpointInfo match their declared method. HEAD first checks HEAD routes across the router hierarchy, then falls back to GET routing while preserving the original HEAD request for the selected handler and middleware. HTTP servers suppress HEAD response content at the transport boundary.

§Route Middleware Support

Per-route middleware configuration is now available. You can attach middleware to specific routes or route groups:

ⓘ

let router = UnifiedRouter::new()
    .endpoint(|| Public)
    .endpoint(|| Protected);
    // .with_route_middleware(...) // Route-specific middleware

Features:

  • Per-route middleware configuration
  • Route group middleware with inheritance
  • Middleware composition and chaining
  • Proper execution order: global → group → route → handler

See reinhardt-routers crate documentation for detailed usage and examples.

Re-exports§

pub use reinhardt_routers_macros as routers_macros;routers-macros

Modules§

preluderouters
Commonly used types re-exported for convenience.
proxynative and proxy
Reinhardt Association Proxy
routers
Reinhardt Routers