pub(crate) struct SpdyInput {
stdin: Option<StreamReceiver>,
peer_closed: Arc<AtomicBool>,
resize: Option<StreamReceiver>,
resize_events: ResizeEvents,
connection: Option<Connection>,
pub(super) done: CancellationToken,
}Expand description
The input of a SPDY client: the stdin stream, whose end closes stdin, and
the resize stream, which carries consecutive JSON objects. Clients open a
resize stream only with a terminal, which the server does not know for an
attach, so it may also come after the session started. Both get read
together: once the stdin which the process does not read fills
PENDING_STDIN_MAX_BYTES of the session, the resizes wait as well.
Fields§
§stdin: Option<StreamReceiver>§peer_closed: Arc<AtomicBool>Set once the client closed its stdin cleanly, so that the output,
which fails once the connection ended, does not end the session
before the stdin got forwarded, see Output. The
end of the connection is a clean close then, which still forwards the
stdin the client sent before.
resize: Option<StreamReceiver>§resize_events: ResizeEvents§connection: Option<Connection>The connection, for the streams which come after the start, see
SpdyInput::late_stream.
done: CancellationTokenCancelled once the connection ended.
Implementations§
Source§impl SpdyInput
impl SpdyInput
Sourcefn late_stream(&mut self, stream: Stream)
fn late_stream(&mut self, stream: Stream)
Take a stream which comes after the start: the resize stream, and
output streams the session does not use, which end right away, like
stderr which clients open for a terminal without asking for one.
Others get reset. Nothing gets awaited, the caller may cancel
ClientInput::next.
Trait Implementations§
Source§impl ClientInput for SpdyInput
impl ClientInput for SpdyInput
Source§async fn next(&mut self) -> Option<ClientEvent>
async fn next(&mut self) -> Option<ClientEvent>
None once the client went away without a clean
close.Source§fn answer_close(&mut self) -> impl Future<Output = ()> + Send
fn answer_close(&mut self) -> impl Future<Output = ()> + Send
web::answer_close.Auto Trait Implementations§
impl !Freeze for SpdyInput
impl RefUnwindSafe for SpdyInput
impl Send for SpdyInput
impl Sync for SpdyInput
impl Unpin for SpdyInput
impl UnsafeUnpin for SpdyInput
impl UnwindSafe for SpdyInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].