Skip to content

Commit

Permalink
document messagebody trait items
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Apr 14, 2021
1 parent 1bfdfd1 commit 037ac80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion actix-http/src/body/message_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<'_>,
Expand Down

0 comments on commit 037ac80

Please sign in to comment.