[][src]Struct actix_web::body::SizedStream

pub struct SizedStream<S> where
    S: Unpin
{ /* fields omitted */ }

Type represent streaming body. This body implementation should be used if total size of stream is known. Data get sent as is without using transfer encoding.

Implementations

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

pub fn new(size: u64, stream: S) -> SizedStream<S>[src]

Trait Implementations

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

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

pub fn poll_next(
    self: Pin<&mut SizedStream<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 SizedStream's transmission being ended on a zero-length chunk, but rather proceed until the underlying Stream ends.

impl<'pin, S> Unpin for SizedStream<S> where
    S: Unpin,
    __SizedStream<'pin, S>: Unpin
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for SizedStream<S> where
    S: RefUnwindSafe

impl<S> Send for SizedStream<S> where
    S: Send

impl<S> Sync for SizedStream<S> where
    S: Sync

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