From 6d2f02ee5ed54074a765506354fef760e7d4e2fc Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 8 Oct 2017 20:55:44 -0700 Subject: [PATCH] doc strings --- src/lib.rs | 2 +- src/payload.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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() }