Library for parsing url paths into structs and generating url paths from structs in rust
structpath is a libary which allows parsing and generating url paths in a convenient type safe way.
structpath leverages serde to help parse values into structs.
```rust,ignore use serde::{Deserialize, Serialize}; use structpath::Schema;
struct FooParams { foo_id: u128, bar: String, }
const foo_path = "/foo/
// This is a general idea of a web request handler, not important for the demonstration fn foobar(request: Request) -> Response { let params: FooParams = Schema::path(foopath).parse(request.path); }
fn baz(request: Request) -> Response { let foopath = Schema::path(foopath).generate(FooParams{fooid: fooid, bar: bar}); Response::Redirect(foo_path) } ```