pub(crate) enum StreamCommand {
Reset {
code: u64,
},
Inject {
bytes: Bytes,
},
}Expand description
A request delivered to the task that owns one forwarded stream.
A channel rather than a shared handle because both operations here need
&mut SendStream, and the stream is moved by value into its forwarding
task on every path this proxy takes. See
StreamEntry for the rest of that
argument.
Variants§
Reset
Abandon this stream: reset the destination with code and stop the
source with the same code.
Inject
Write these bytes onto this stream at the next point the receiving decoder accepts one.
Only the two control directions ever receive this. A data stream’s task has no notion of a message boundary — it forwards chunks — so it could not honour the “in sequence” half of the request, and nothing routes one to it.
Fields
§
bytes: BytesA complete, framed control message, written verbatim.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StreamCommand
impl RefUnwindSafe for StreamCommand
impl Send for StreamCommand
impl Sync for StreamCommand
impl Unpin for StreamCommand
impl UnsafeUnpin for StreamCommand
impl UnwindSafe for StreamCommand
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
Mutably borrows from an owned value. Read more