diff --git a/src/lib.rs b/src/lib.rs index f48ea5351..9df803f84 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -//! Actix http framework +//! Http framework for [Actix](https://github.com/fafhrd91/actix) #[macro_use] extern crate log; diff --git a/src/payload.rs b/src/payload.rs index 3b54ba3d6..d4de18593 100644 --- a/src/payload.rs +++ b/src/payload.rs @@ -5,6 +5,7 @@ use bytes::Bytes; use futures::{Async, Poll, Stream}; use futures::task::{Task, current as current_task}; +/// Just Bytes object pub type PayloadItem = Bytes; const MAX_PAYLOAD_SIZE: usize = 65_536; // max buffer size 64k @@ -47,7 +48,8 @@ impl Payload { self.inner.borrow().len() == 0 } - /// Get any chunk of data + /// Get first available chunk of data. + /// Chunk get returned as Some(PayloadItem), `None` indicates eof. pub fn readany(&mut self) -> Async> { self.inner.borrow_mut().readany() }