pub struct HttpStream<E> { /* private fields */ }Expand description
An owned HTTP stream. Dropping it closes the connection and releases its slot.
Implementations§
Source§impl<E> HttpStream<E>
impl<E> HttpStream<E>
Sourcepub fn close(self) -> BufferedEvents<E> ⓘ
pub fn close(self) -> BufferedEvents<E> ⓘ
Closes network ingress and transfers exactly the already buffered prefix.
The returned iterator retains the decoder and original ordering, with the
same record and backlog limits. It owns no response or admission lease.
No unread OS/socket/HTTP-body bytes are fetched; this is a local buffer
cut, not evidence of a complete venue sequence or transaction boundary.
Cancel a pending next_event borrow before consuming the stream here.
The iterator yields StreamAlreadyEnded if this generation had already
ended, and IncompleteStreamRecord for an unterminated tail. Decode and
size errors also end the iterator. Exhaust it successfully before claiming
that the buffered prefix was delivered.
Sourcepub async fn next_event(&mut self) -> Option<Result<E>>
pub async fn next_event(&mut self) -> Option<Result<E>>
Read the next event. Any error ends this generation and creates a continuity gap.