docs.rs failed to build finchers-0.12.0-alpha.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
finchers-0.13.5
A combinator library for building asynchronous HTTP services.
The concept and design was highly inspired by finch
.
Features
- Asynchronous handling powerd by futures and Tokio
- Building an HTTP service by combining the primitive components
- Type-safe routing without (unstable) procedural macros
Example
use finchers::endpoint::EndpointExt;
use finchers::endpoints::{body, path};
use finchers::route;
fn main() {
let get_post = route!(@get / u64 /)
.map(|id: u64| format!("GET: id={}", id));
let create_post = route!(@post /)
.and(body::text())
.map(|data: String| format!("POST: body={}", data));
let post_api = path::path("posts")
.and(get_post.or(create_post));
# std::mem::drop(move || {
finchers::launch(post_api)
.start("127.0.0.1:4000")
# });
}