enum Source {
Read(Result<Option<usize>, TransportError>),
ResetUnobservable,
}Expand description
What one poll of the source stream saw.
The two pipe loops that queue what they read — pipe_control_mutating
and pipe_data_framed — poll their source through
observe_source rather than calling recv.read directly, and this is
what it hands back.
Variants§
Read(Result<Option<usize>, TransportError>)
recv.read’s own result, verbatim: Ok(Some(n)) bytes into the
caller’s buffer, Ok(None) a clean FIN, Err a failure.
A reset seen by the reset-only observer arrives here too, as
Err(TransportError::StreamReset(code)) — byte-identical to what
recv.read would have produced — so propagate_reset mirrors the
same code down the same path and neither pipe loop has to know
which observer was live.
ResetUnobservable
The source can no longer be reset, and the reset-only observer must
not be polled again: it resolves immediately every time (see
RecvStream::received_reset), so re-polling it spins. The caller
latches it off and the branch parks for the rest of the stream,
which is exactly the disabled read branch this replaced.