Crate ruled_router

Crate ruled_router 

Source
Expand description

ruled-router - 基于宏的 Rust 路由解析库

这个库提供了一种声明式的方式来定义和解析 Web 路由, 通过派生宏自动生成解析器和格式化器。 模块定义

Re-exports§

pub use error::ParseError;
pub use error::ParseResult;
pub use formatter::PathFormatter;
pub use formatter::QueryFormatter;
pub use formatter::UrlFormatter;
pub use parser::PathParser;
pub use parser::QueryParser;
pub use traits::FromParam;
pub use traits::NoSubRouter;
pub use traits::Query;
pub use traits::RouteMatcher;
pub use traits::RouterData;
pub use traits::ToParam;

Modules§

error
错误类型定义
formatter
路由格式化器
parser
解析器模块
prelude
Prelude module for convenient imports
traits
核心 trait 定义
utils
工具函数

Derive Macros§

QueryDerive
Derive macro for implementing the Query trait
QueryString
Derive macro for implementing querystring parsing and formatting
RouterData
Derive macro for implementing the RouterData trait
RouterMatch
Derive macro for implementing the RouterMatch trait