[−][src]Struct actix_web::body::SizedStream
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]
S: Stream<Item = Result<Bytes, Error>> + Unpin,
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]
S: Stream<Item = Result<Bytes, Error>> + Unpin + 'static,
fn from(s: SizedStream<S>) -> Body
[src]
impl<S> MessageBody for SizedStream<S> where
S: Stream<Item = Result<Bytes, Error>> + Unpin,
[src]
S: Stream<Item = Result<Bytes, Error>> + Unpin,
fn size(&self) -> BodySize
[src]
fn poll_next(
self: Pin<&mut SizedStream<S>>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
[src]
self: Pin<&mut SizedStream<S>>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Error>>>
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]
S: Unpin,
__SizedStream<'pin, S>: Unpin,
impl<S> UnsafeUnpin for SizedStream<S> where
S: Unpin,
[src]
S: Unpin,
Auto Trait Implementations
impl<S> RefUnwindSafe for SizedStream<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for SizedStream<S> where
S: Send,
S: Send,
impl<S> Sync for SizedStream<S> where
S: Sync,
S: Sync,
impl<S> UnwindSafe for SizedStream<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,