[][src]Trait ntex::http::body::MessageBody

pub trait MessageBody {
    fn size(&self) -> BodySize;
fn poll_next_chunk(
        &mut self,
        cx: &mut Context
    ) -> Poll<Option<Result<Bytes, Box<dyn Error>>>>; }

Type that provides this trait can be streamed to a peer.

Required methods

fn size(&self) -> BodySize

fn poll_next_chunk(
    &mut self,
    cx: &mut Context
) -> Poll<Option<Result<Bytes, Box<dyn Error>>>>

Loading content...

Implementations on Foreign Types

impl MessageBody for ()[src]

impl<T: MessageBody> MessageBody for Box<T>[src]

impl MessageBody for Bytes[src]

impl MessageBody for BytesMut[src]

impl MessageBody for &'static str[src]

impl MessageBody for &'static [u8][src]

impl MessageBody for Vec<u8>[src]

impl MessageBody for String[src]

Loading content...

Implementors

impl MessageBody for Body[src]

impl<B: MessageBody> MessageBody for ResponseBody<B>[src]

impl<B: MessageBody> MessageBody for Encoder<B>[src]

impl<S> MessageBody for SizedStream<S> where
    S: Stream<Item = Result<Bytes, Box<dyn Error>>> + Unpin
[src]

fn poll_next_chunk(
    &mut self,
    cx: &mut Context
) -> Poll<Option<Result<Bytes, Box<dyn Error>>>>
[src]

Attempts to pull out the next value of the underlying Stream.

Empty values are skipped to prevent SizedStream's transmission being ended on a zero-length chunk, but rather proceed until the underlying Stream ends.

impl<S, E> MessageBody for BodyStream<S, E> where
    S: Stream<Item = Result<Bytes, E>> + Unpin,
    E: Error + 'static, 
[src]

fn poll_next_chunk(
    &mut self,
    cx: &mut Context
) -> Poll<Option<Result<Bytes, Box<dyn Error>>>>
[src]

Attempts to pull out the next value of the underlying Stream.

Empty values are skipped to prevent BodyStream's transmission being ended on a zero-length chunk, but rather proceed until the underlying Stream ends.

Loading content...