Struct h2::RecvStream [−][src]
Receives the body stream and trailers from the remote peer.
A RecvStream
is provided by client::ResponseFuture
and
server::Connection
with the received HTTP/2.0 message head (the response
and request head respectively).
A RecvStream
instance is used to receive the streaming message body and
any trailers from the remote peer. It is also used to manage inbound flow
control.
See method level documentation for more details on receiving data. See
ReleaseCapacity
for more details on inbound flow control.
Note that this type implements Stream
, yielding the received data frames.
When this implementation is used, the capacity is immediately released when
the data is yielded. It is recommended to only use this API when the data
will not be retained in memory for extended periods of time.
Methods
impl RecvStream
[src]
[−]
impl RecvStream
pub fn is_end_stream(&self) -> bool
[src]
[−]
pub fn is_end_stream(&self) -> bool
Returns true if the receive half has reached the end of stream.
A return value of true
means that calls to poll
and poll_trailers
will both return None
.
pub fn release_capacity(&mut self) -> &mut ReleaseCapacity
[src]
[−]
pub fn release_capacity(&mut self) -> &mut ReleaseCapacity
Get a mutable reference to this streams ReleaseCapacity
.
It can be used immediately, or cloned to be used later.
pub fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Error>
[src]
[−]
pub fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Error>
Returns received trailers.
Trait Implementations
impl Stream for RecvStream
[src]
[+]
impl Stream for RecvStream
impl Debug for RecvStream
[src]
[+]
impl Debug for RecvStream
Auto Trait Implementations
impl Send for RecvStream
impl Send for RecvStream
impl Sync for RecvStream
impl Sync for RecvStream