Struct ntex::http::body::SizedStream [−][src]
pub struct SizedStream<S> { /* fields omitted */ }
Expand description
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
Trait Implementations
impl<S> From<SizedStream<S>> for Body where
S: Stream<Item = Result<Bytes, Box<dyn Error>>> + Unpin + 'static,
[src]
impl<S> From<SizedStream<S>> for Body where
S: Stream<Item = Result<Bytes, Box<dyn Error>>> + Unpin + 'static,
[src]fn from(s: SizedStream<S>) -> Body
[src]
fn from(s: SizedStream<S>) -> Body
[src]Performs the conversion.
impl<S> MessageBody for SizedStream<S> where
S: Stream<Item = Result<Bytes, Box<dyn Error>>> + Unpin,
[src]
impl<S> MessageBody for SizedStream<S> where
S: Stream<Item = Result<Bytes, Box<dyn Error>>> + Unpin,
[src]fn poll_next_chunk(
&mut self,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, Box<dyn Error>>>>
[src]
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 SizedStream
’s transmission being
ended on a zero-length chunk, but rather proceed until the underlying
Stream
ends.
fn size(&self) -> BodySize
[src]
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> Unpin for SizedStream<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for SizedStream<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self