1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-13 10:49:26 +00:00

doc strings

This commit is contained in:
Nikolay Kim 2017-10-08 20:55:44 -07:00
parent e2dc775e21
commit 6d2f02ee5e
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,4 @@
//! Actix http framework
//! Http framework for [Actix](https://github.com/fafhrd91/actix)
#[macro_use]
extern crate log;

View file

@ -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<Option<PayloadItem>> {
self.inner.borrow_mut().readany()
}