Skip to main content

reinhardt_router/
lib.rs

1//! Shared router trait surface for the Reinhardt framework.
2//!
3//! This crate exists to break the circular dependency between
4//! `reinhardt-urls` (which owns the concrete router implementations) and
5//! `reinhardt-rest` (which needs to read namespace / path information
6//! out of a router to drive its versioning strategies).
7//!
8//! Both crates depend on `reinhardt-router` instead of each other,
9//! and concrete router types implement [`VersionedRouter`] so that
10//! `reinhardt-rest::versioning` can operate generically without knowing
11//! about URL pattern internals.
12//!
13//! See <https://github.com/kent8192/reinhardt-web/issues/4321>.
14
15#![forbid(unsafe_code)]
16#![warn(missing_docs)]
17#![cfg_attr(docsrs, feature(doc_cfg))]
18
19pub mod router;
20pub mod version;
21
22pub use router::VersionedRouter;
23pub use version::RouteVersionInfo;