miketang84 / sapper

A lightweight web framework built on hyper, implemented in Rust language.
MIT License
617 stars 46 forks source link

export Params for user #28

Closed DCjanus closed 6 years ago

DCjanus commented 6 years ago

Sometime users want to save or pass params, but the Params is private, that means, I can't write code such as

fn save_params(params: sapper::sapper::recognizer::Params) {
    // some code
}

I have to write it like

fn save_params(req:sapper::Request) {
    let params=get_params!(req);
    // some code
}