Struct actix_web::body::BodyStream[][src]

pub struct BodyStream<S> where
    S: Unpin
{ /* 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> where
    E: Into<Error>,
    S: Stream<Item = Result<Bytes, E>> + Unpin
[src]

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

Trait Implementations

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

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

pub fn poll_next(
    self: Pin<&mut BodyStream<S>>,
    cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, 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> RefUnwindSafe for BodyStream<S> where
    S: RefUnwindSafe
[src]

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

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

impl<S> Unpin for BodyStream<S>[src]

impl<S> UnwindSafe for BodyStream<S> where
    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>,