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

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

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

Trait Implementations

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

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

fn poll_next(
    self: Pin<&mut BodyStream<S, E>>,
    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.

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

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

Auto Trait Implementations

impl<S, E> RefUnwindSafe for BodyStream<S, E> where
    E: RefUnwindSafe,
    S: RefUnwindSafe

impl<S, E> Send for BodyStream<S, E> where
    E: Send,
    S: Send

impl<S, E> Sync for BodyStream<S, E> where
    E: Sync,
    S: Sync

impl<S, E> UnwindSafe for BodyStream<S, E> where
    E: UnwindSafe,
    S: UnwindSafe

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, 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>,