//! # urus — a cowboy/bandit-style HTTP library for the smarm actor runtime. //! //! v1 covers HTTP/1.1, the plug pipeline, and a built-in router. See //! `urus-spec.md` for the design. //! //! ```no_run //! use urus::{Pipeline, Router, Conn, Next, serve}; //! //! let pipeline = Pipeline::new().plug( //! Router::new() //! .get("/", |c: Conn, _n: Next| c.put_status(200).put_body("hello")) //! .get("/users/:id", |c: Conn, _n: Next| { //! let id = c.params.get("id").unwrap_or("").to_string(); //! c.put_status(200).put_body(id) //! }) //! ); //! //! serve("0.0.0.0:8080", pipeline).unwrap(); //! ``` pub mod conn; pub mod plug; pub mod router; pub mod parser; pub mod net; pub mod conn_actor; pub mod conn_registry; pub mod serve; // Re-exports — what most users want at the crate root. pub use conn::{Assigns, Body, Conn, HeaderMap, HttpVersion, Method, Params, RespBody, StreamBody}; pub use plug::{Next, Pipeline, Plug}; pub use router::Router; pub use serve::{ serve, serve_with, serve_with_shutdown, shutdown_handle, Config, Handle, ShutdownSignal, };