mirror of
https://github.com/actix/actix-web.git
synced 2025-02-22 05:46:17 +00:00
add Stream impl for ResponseBody
This commit is contained in:
parent
34c8b95a35
commit
889d67a356
1 changed files with 9 additions and 0 deletions
|
@ -91,6 +91,15 @@ impl<B: MessageBody> MessageBody for ResponseBody<B> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<B: MessageBody> Stream for ResponseBody<B> {
|
||||||
|
type Item = Bytes;
|
||||||
|
type Error = Error;
|
||||||
|
|
||||||
|
fn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error> {
|
||||||
|
self.poll_next()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Represents various types of http message body.
|
/// Represents various types of http message body.
|
||||||
pub enum Body {
|
pub enum Body {
|
||||||
/// Empty response. `Content-Length` header is not set.
|
/// Empty response. `Content-Length` header is not set.
|
||||||
|
|
Loading…
Reference in a new issue