pathrouter 0.2.0

a simple router library
Documentation

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.