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:
parent
1bfdfd1f41
commit
037ac80a32
1 changed files with 3 additions and 1 deletions
|
@ -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<'_>,
|
||||
|
|
Loading…
Reference in a new issue