1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-27 12:01:15 +00:00

fix typos

This commit is contained in:
Nikolay Kim 2017-12-19 00:29:25 -08:00
parent f3b853f224
commit 4f6145e5c7
2 changed files with 6 additions and 4 deletions

View file

@ -122,7 +122,7 @@ fn index(req: HttpRequest) -> HttpResponse {
## Streaming request
Actix uses [*Payload*](../actix_web/struct.Payload.html) object as request payload stream.
Actix uses [*Payload*](../actix_web/payload/struct.Payload.html) object as request payload stream.
*HttpRequest* provides several methods, which can be used for payload access.
At the same time *Payload* implements *Stream* trait, so it could be used with various
stream combinators. Also *Payload* provides serveral convinience methods that return

View file

@ -43,10 +43,12 @@ impl fmt::Debug for PayloadItem {
}
}
/// Stream of byte chunks
/// Buffered stream of bytes chunks
///
/// Payload stores chunks in vector. First chunk can be received with `.readany()` method.
/// Payload stores chunks in a vector. First chunk can be received with `.readany()` method.
/// Payload stream is not thread safe.
///
/// Payload stream can be used as `HttpResponse` body stream.
#[derive(Debug)]
pub struct Payload {
inner: Rc<RefCell<Inner>>,
@ -128,7 +130,7 @@ impl Payload {
self.inner.borrow_mut().set_buffer_size(size)
}
/// Convert payload into BodyStream
/// Convert payload into compatible `HttpResponse` body stream
pub fn stream(self) -> BodyStream {
Box::new(self.map_err(|e| e.into()))
}