mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-19 06:04:40 +01:00
document messagebody trait items
This commit is contained in:
parent
1bfdfd1f41
commit
037ac80a32
@ -12,10 +12,12 @@ use crate::error::Error;
|
|||||||
|
|
||||||
use super::BodySize;
|
use super::BodySize;
|
||||||
|
|
||||||
/// Type that implement this trait can be streamed to a peer.
|
/// An interface for response bodies.
|
||||||
pub trait MessageBody {
|
pub trait MessageBody {
|
||||||
|
/// Body size hint.
|
||||||
fn size(&self) -> BodySize;
|
fn size(&self) -> BodySize;
|
||||||
|
|
||||||
|
/// Attempt to pull out the next chunk of body bytes.
|
||||||
fn poll_next(
|
fn poll_next(
|
||||||
self: Pin<&mut Self>,
|
self: Pin<&mut Self>,
|
||||||
cx: &mut Context<'_>,
|
cx: &mut Context<'_>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user