1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-20 08:31:09 +00:00

document messagebody trait items

This commit is contained in:
Rob Ede 2021-04-14 03:23:15 +01:00
parent 1bfdfd1f41
commit 037ac80a32
No known key found for this signature in database
GPG key ID: 97C636207D3EF933

View file

@ -12,10 +12,12 @@ use crate::error::Error;
use super::BodySize;
/// Type that implement this trait can be streamed to a peer.
/// An interface for response bodies.
pub trait MessageBody {
/// Body size hint.
fn size(&self) -> BodySize;
/// Attempt to pull out the next chunk of body bytes.
fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,