mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 05:41:50 +01:00
doc strings
This commit is contained in:
parent
e2dc775e21
commit
6d2f02ee5e
@ -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;
|
||||||
|
@ -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()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user