1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-01-18 05:41:50 +01: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] #[macro_use]
extern crate log; extern crate log;

View File

@ -5,6 +5,7 @@ use bytes::Bytes;
use futures::{Async, Poll, Stream}; use futures::{Async, Poll, Stream};
use futures::task::{Task, current as current_task}; use futures::task::{Task, current as current_task};
/// Just Bytes object
pub type PayloadItem = Bytes; pub type PayloadItem = Bytes;
const MAX_PAYLOAD_SIZE: usize = 65_536; // max buffer size 64k const MAX_PAYLOAD_SIZE: usize = 65_536; // max buffer size 64k
@ -47,7 +48,8 @@ impl Payload {
self.inner.borrow().len() == 0 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>> { pub fn readany(&mut self) -> Async<Option<PayloadItem>> {
self.inner.borrow_mut().readany() self.inner.borrow_mut().readany()
} }