diff options
| author | Teddy Wing | 2020-07-04 15:33:59 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2020-07-04 15:33:59 +0200 | 
| commit | 5a207c6649a67871c209f8e1634efcbcc719bee6 (patch) | |
| tree | cb567c4cb08701c56cdc4b70289879f76b218ec2 /src/lib.rs | |
| parent | 44967e5ae07fc99f56c14dc440cf795851ae117f (diff) | |
| download | fastcgi-conduit-5a207c6649a67871c209f8e1634efcbcc719bee6.tar.bz2 | |
Add documentation
Write doc comments for functions and types, and include a short example.
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 32 | 
1 files changed, 32 insertions, 0 deletions
| @@ -1,3 +1,35 @@ +#![warn(missing_docs)] + +//! # fastcgi-conduit +//! +//! FastCGI-Conduit provides a [Conduit] interface to FastCGI, enabling a +//! high-level API for FastCGI applications. +//! +//! +//! ## Example +//! +//! ``` rust +//! use conduit::{header, Body, RequestExt, Response}; +//! use fastcgi_conduit::Server; +//! +//! +//! fn main() { +//!     Server::start(handler).unwrap(); +//! } +//! +//! fn handler(_req: &mut dyn RequestExt) -> std::io::Result<Response<Body>> { +//!     Ok( +//!         Response::builder() +//!             .header(header::CONTENT_TYPE, "text/html") +//!             .body(Body::from_static(b"<h1>Hello</h1>")) +//!             .unwrap() +//!     ) +//! } +//! ``` +//! +//! +//! [Conduit]: ../conduit/index.html +  extern crate conduit;  extern crate fastcgi;  extern crate http; | 
