struct Actions {
recv: Recv,
send: Send,
task: Option<Waker>,
conn_error: Option<Error>,
}
Fields§
§recv: Recv
Manages state transitions initiated by receiving frames
send: Send
Manages state transitions initiated by sending frames
task: Option<Waker>
Task that calls poll_complete
.
conn_error: Option<Error>
If the connection errors, a copy is kept for any StreamRefs.
Implementations§
source§impl Actions
impl Actions
fn send_reset<B>( &mut self, stream: Ptr<'_>, reason: Reason, initiator: Initiator, counts: &mut Counts, send_buffer: &mut Buffer<Frame<B>> )
fn reset_on_recv_stream_err<B>( &mut self, buffer: &mut Buffer<Frame<B>>, stream: &mut Ptr<'_>, counts: &mut Counts, res: Result<(), Error> ) -> Result<(), Error>
fn ensure_not_idle(&mut self, peer: Dyn, id: StreamId) -> Result<(), Reason>
fn ensure_no_conn_error(&self) -> Result<(), Error>
sourcefn may_have_forgotten_stream(&self, peer: Dyn, id: StreamId) -> bool
fn may_have_forgotten_stream(&self, peer: Dyn, id: StreamId) -> bool
Check if we possibly could have processed and since forgotten this stream.
If we send a RST_STREAM for a stream, we will eventually “forget” about the stream to free up memory. It’s possible that the remote peer had frames in-flight, and by the time we receive them, our own state is gone. We could tear everything down by sending a GOAWAY, but it is more likely to be latency/memory constraints that caused this, and not a bad actor. So be less catastrophic, the spec allows us to send another RST_STREAM of STREAM_CLOSED.
fn clear_queues( &mut self, clear_pending_accept: bool, store: &mut Store, counts: &mut Counts )
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Actions
impl Send for Actions
impl Sync for Actions
impl Unpin for Actions
impl !UnwindSafe for Actions
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