[][src]Struct ntex::http::body::BodyStream

pub struct BodyStream<S, E> { /* fields omitted */ }

Type represent streaming body. Response does not contain content-length header and appropriate transfer encoding is used.

Implementations

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

pub fn new(stream: S) -> Self[src]

Trait Implementations

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

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

pub 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.

Auto Trait Implementations

impl<S, E> RefUnwindSafe for BodyStream<S, E> where
    E: RefUnwindSafe,
    S: RefUnwindSafe
[src]

impl<S, E> Send for BodyStream<S, E> where
    E: Send,
    S: Send
[src]

impl<S, E> Sync for BodyStream<S, E> where
    E: Sync,
    S: Sync
[src]

impl<S, E> Unpin for BodyStream<S, E> where
    E: Unpin,
    S: Unpin
[src]

impl<S, E> UnwindSafe for BodyStream<S, E> where
    E: UnwindSafe,
    S: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,