mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 09:42:40 +01:00
add Stream impl for ResponseBody
This commit is contained in:
parent
34c8b95a35
commit
889d67a356
@ -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 New Issue
Block a user