pub(super) struct Send {
next_stream_id: Result<StreamId, StreamIdOverflow>,
max_stream_id: StreamId,
init_window_sz: u32,
prioritize: Prioritize,
is_push_enabled: bool,
is_extended_connect_protocol_enabled: bool,
}
Expand description
Manages state transitions related to outbound frames.
Fields§
§next_stream_id: Result<StreamId, StreamIdOverflow>
Stream identifier to use for next initialized stream.
max_stream_id: StreamId
Any streams with a higher ID are ignored.
This starts as MAX, but is lowered when a GOAWAY is received.
After sending a GOAWAY frame, the sender can discard frames for streams initiated by the receiver with identifiers higher than the identified last stream.
init_window_sz: u32
Initial window size of locally initiated streams
prioritize: Prioritize
Prioritization layer
is_push_enabled: bool
§is_extended_connect_protocol_enabled: bool
If extended connect protocol is enabled.
Implementations§
source§impl Send
impl Send
sourcepub fn init_window_sz(&self) -> u32
pub fn init_window_sz(&self) -> u32
Returns the initial send window size
pub fn open(&mut self) -> Result<StreamId, UserError>
pub fn reserve_local(&mut self) -> Result<StreamId, UserError>
fn check_headers(fields: &HeaderMap) -> Result<(), UserError>
pub fn send_push_promise<B>( &mut self, frame: PushPromise, buffer: &mut Buffer<Frame<B>>, stream: &mut Ptr<'_>, task: &mut Option<Waker>, ) -> Result<(), UserError>
pub fn send_headers<B>( &mut self, frame: Headers, buffer: &mut Buffer<Frame<B>>, stream: &mut Ptr<'_>, counts: &mut Counts, task: &mut Option<Waker>, ) -> Result<(), UserError>
sourcepub fn send_reset<B>(
&mut self,
reason: Reason,
initiator: Initiator,
buffer: &mut Buffer<Frame<B>>,
stream: &mut Ptr<'_>,
counts: &mut Counts,
task: &mut Option<Waker>,
)
pub fn send_reset<B>( &mut self, reason: Reason, initiator: Initiator, buffer: &mut Buffer<Frame<B>>, stream: &mut Ptr<'_>, counts: &mut Counts, task: &mut Option<Waker>, )
Send an explicit RST_STREAM frame
pub fn schedule_implicit_reset( &mut self, stream: &mut Ptr<'_>, reason: Reason, counts: &mut Counts, task: &mut Option<Waker>, )
pub fn send_data<B>(
&mut self,
frame: Data<B>,
buffer: &mut Buffer<Frame<B>>,
stream: &mut Ptr<'_>,
counts: &mut Counts,
task: &mut Option<Waker>,
) -> Result<(), UserError>where
B: Buf,
pub fn send_trailers<B>( &mut self, frame: Headers, buffer: &mut Buffer<Frame<B>>, stream: &mut Ptr<'_>, counts: &mut Counts, task: &mut Option<Waker>, ) -> Result<(), UserError>
pub fn poll_complete<T, B>( &mut self, cx: &mut Context<'_>, buffer: &mut Buffer<Frame<B>>, store: &mut Store, counts: &mut Counts, dst: &mut Codec<T, Prioritized<B>>, ) -> Poll<Result<()>>
sourcepub fn reserve_capacity(
&mut self,
capacity: u32,
stream: &mut Ptr<'_>,
counts: &mut Counts,
)
pub fn reserve_capacity( &mut self, capacity: u32, stream: &mut Ptr<'_>, counts: &mut Counts, )
Request capacity to send data
pub fn poll_capacity( &mut self, cx: &Context<'_>, stream: &mut Ptr<'_>, ) -> Poll<Option<Result<u32, UserError>>>
pub fn poll_reset( &self, cx: &Context<'_>, stream: &mut Stream, mode: PollReset, ) -> Poll<Result<Reason, Error>>
pub fn recv_connection_window_update( &mut self, frame: WindowUpdate, store: &mut Store, counts: &mut Counts, ) -> Result<(), Reason>
pub fn recv_stream_window_update<B>( &mut self, sz: u32, buffer: &mut Buffer<Frame<B>>, stream: &mut Ptr<'_>, counts: &mut Counts, task: &mut Option<Waker>, ) -> Result<(), Reason>
pub(super) fn recv_go_away( &mut self, last_stream_id: StreamId, ) -> Result<(), Error>
pub fn handle_error<B>( &mut self, buffer: &mut Buffer<Frame<B>>, stream: &mut Ptr<'_>, counts: &mut Counts, )
pub fn apply_remote_settings<B>( &mut self, settings: &Settings, buffer: &mut Buffer<Frame<B>>, store: &mut Store, counts: &mut Counts, task: &mut Option<Waker>, ) -> Result<(), Error>
pub fn clear_queues(&mut self, store: &mut Store, counts: &mut Counts)
pub fn ensure_not_idle(&self, id: StreamId) -> Result<(), Reason>
pub fn ensure_next_stream_id(&self) -> Result<StreamId, UserError>
pub fn may_have_created_stream(&self, id: StreamId) -> bool
pub(super) fn maybe_reset_next_stream_id(&mut self, id: StreamId)
pub(crate) fn is_extended_connect_protocol_enabled(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Send
impl RefUnwindSafe for Send
impl Send for Send
impl Sync for Send
impl Unpin for Send
impl UnwindSafe for Send
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