aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2020-07-04 15:33:59 +0200
committerTeddy Wing2020-07-04 15:33:59 +0200
commit5a207c6649a67871c209f8e1634efcbcc719bee6 (patch)
treecb567c4cb08701c56cdc4b70289879f76b218ec2 /src/lib.rs
parent44967e5ae07fc99f56c14dc440cf795851ae117f (diff)
downloadfastcgi-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.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2ffe77e..caf8663 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;