Skip to content

SlNPacifist/iron-mountrouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iron mounting router

Routing handler for the Iron web framework. First version based on Router project trying to keep all of its features and add Mount functionality.

Why not just used Router + Mount, they work together perfectly?

Mount only works with predefined strings and cannot be used like django's router to strip matched part of query for further handlers.

Router does not accept http method, why is that?

Usually routers restrict developer to specifiy method. Mountrouter enforces REST ideology: you first identify resource using path and then perform action based on method. MethodPicker struct allows developer to specify handler for http methods.

Installation

If you're using cargo, just add router to your Cargo.toml.

[dependencies]

iron-mountrouter = { git = "https://github.com/SlNPacifist/iron-mountrouter", version = "*" }

Then in your main.rs

extern crate iron_mountrouter;
use iron_mountrouter::{Router, MethodPicker};

Otherwise, cargo build, and the rlib will be in your target directory.

Releases

No releases published

Packages

No packages published

Languages