pub enum AnyInboundRequest {
ControlPlane {
request_id: VarInt,
draft: DraftVersion,
},
Draft17(RequestStream),
Draft18(RequestStream),
Draft19(RequestStream),
Draft20(RequestStream),
Draft21(RequestStream),
}Expand description
A request the peer made, and the handle this side answers it through.
The mirror of AnyRequest, and split the same way and for the same
reason: drafts 07 through 16 carry every request on one shared control
stream and identify it by its Request ID, and from draft-17 each request
owns a bidirectional stream that is its identity. What differs is who
allocated the ID — here the peer did, so it is read off the message rather
than out of this endpoint’s own sequence.
There is no Draft16 stream variant, unlike AnyRequest. Draft-16 gave a
stream to namespace subscriptions alone, and an inbound SUBSCRIBE on that
draft still arrives on the control stream.
Dropping an unanswered request from draft-17 on resets its stream, which the
peer reads as a refusal. Dropping a AnyInboundRequest::ControlPlane does
nothing at all, and the peer is left waiting — refusing there means sending
the draft’s own error message through the variant.
Variants§
ControlPlane
Drafts 07-16: identified only by the Request ID the peer allocated.
Fields
draft: DraftVersionThe draft that carried it.
Draft17(RequestStream)
Draft-17: the request arrived on a bidirectional stream of its own.
Draft18(RequestStream)
Draft-18: the request arrived on a bidirectional stream of its own.
Draft19(RequestStream)
Draft-19: the request arrived on a bidirectional stream of its own.
Draft20(RequestStream)
Draft-20: the request arrived on a bidirectional stream of its own.
Draft21(RequestStream)
Draft-21: the request arrived on a bidirectional stream of its own.
Implementations§
Source§impl AnyInboundRequest
impl AnyInboundRequest
Sourcepub fn request_id(&self) -> VarInt
pub fn request_id(&self) -> VarInt
The Request ID the peer allocated for this request.
Sourcepub fn draft(&self) -> DraftVersion
pub fn draft(&self) -> DraftVersion
The draft that carries this request.
Sourcepub fn stream_id(&self) -> Option<u64>
pub fn stream_id(&self) -> Option<u64>
The transport stream this request arrived on, or None on a draft that
carries inbound requests on the shared control stream.
The same observable difference AnyRequest::stream_id exposes, in the
other direction.