pathrouter

Crates.iopathrouter
lib.rspathrouter
version0.2.0
sourcesrc
created_at2022-10-16 14:41:36.055136
updated_at2023-07-30 03:15:22.821992
descriptiona simple router library
homepagehttps://github.com/zzzdong/pathrouter
repositoryhttps://github.com/zzzdong/pathrouter
max_upload_size
id689469
size42,657
(zzzdong)

documentation

https://docs.rs/pathrouter/

README

pathrouter

Crates.io Documentation Crates.io Rust

Overview

[pathrouter] is a simple router.

Usage

use pathrouter::{Router, Params};

let mut router = Router::new();

router.add("/posts", "posts");
router.add("/posts/:post_id", "post");

let (endpoint, params) = router.route("/posts/1").unwrap();

License

This project is licensed under the MIT license.

Commit count: 20

cargo fmt