Struct s2n_quic_transport::stream::AbstractStreamManager

source ·
pub struct AbstractStreamManager<S> { /* private fields */ }
Expand description

Manages all active Streams inside a connection. AbstractStreamManager is parameterized over the Stream type.

Trait Implementations§

source§

impl<S: Debug> Debug for AbstractStreamManager<S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S: 'static + StreamTrait> Manager for AbstractStreamManager<S>

source§

fn new( connection_limits: &Limits, local_endpoint_type: Type, initial_local_limits: InitialFlowControlLimits, initial_peer_limits: InitialFlowControlLimits, min_rtt: Duration ) -> Self

Creates a new stream manager using the provided configuration parameters
source§

fn incoming_bytes_progressed(&self) -> VarInt

The number of bytes of forward progress the peer has made on incoming streams
source§

fn outgoing_bytes_progressed(&self) -> VarInt

The number of bytes of forward progress the local endpoint has made on outgoing streams
source§

fn poll_accept( &mut self, stream_type: Option<StreamType>, context: &Context<'_> ) -> Poll<Result<Option<StreamId>, Error>>

Accepts the next incoming stream of a given type
source§

fn poll_open_local_stream( &mut self, stream_type: StreamType, open_token: &mut OpenToken, api_call_context: &mut ConnectionApiCallContext<'_>, context: &Context<'_> ) -> Poll<Result<StreamId, Error>>

Opens the next local initiated stream of a certain type
source§

fn on_packet_ack<A: Set>(&mut self, ack_set: &A)

This method gets called when a packet delivery got acknowledged
source§

fn on_packet_loss<A: Set>(&mut self, ack_set: &A)

This method gets called when a packet loss is reported
source§

fn on_rtt_update(&mut self, rtt_estimator: &RttEstimator, now: Timestamp)

This method gets called when the RTT estimate is updated for the active path
source§

fn on_timeout(&mut self, now: Timestamp)

Called when the connection timer expires
source§

fn close(&mut self, error: Error)

Closes the manager and resets all streams with the given error. The current implementation will still allow to forward frames to the contained Streams as well as to query them for data. However new Streams can not be created.
source§

fn close_reason(&self) -> Option<Error>

If the manager is closed, this returns the error which which was used to close it.
source§

fn flush(&mut self, error: Error) -> Poll<()>

Closes the manager, flushes all send streams and resets all receive streams. Read more
source§

fn on_transmit<W: WriteContext>( &mut self, context: &mut W ) -> Result<(), OnTransmitError>

Queries the component for any outgoing frames that need to get sent
source§

fn on_data(&mut self, frame: &StreamRef<'_>) -> Result<(), Error>

This is called when a STREAM_DATA frame had been received for a stream
source§

fn on_data_blocked(&mut self, _frame: DataBlocked) -> Result<(), Error>

This is called when a DATA_BLOCKED frame had been received
source§

fn on_stream_data_blocked( &mut self, frame: &StreamDataBlocked ) -> Result<(), Error>

This is called when a STREAM_DATA_BLOCKED frame had been received for a stream
source§

fn on_reset_stream(&mut self, frame: &ResetStream) -> Result<(), Error>

This is called when a RESET_STREAM frame had been received for a stream
source§

fn on_max_stream_data(&mut self, frame: &MaxStreamData) -> Result<(), Error>

This is called when a MAX_STREAM_DATA frame had been received for a stream
source§

fn on_stop_sending(&mut self, frame: &StopSending) -> Result<(), Error>

This is called when a STOP_SENDING frame had been received for a stream
source§

fn on_max_data(&mut self, frame: MaxData) -> Result<(), Error>

This is called when a MAX_DATA frame had been received
source§

fn on_streams_blocked(&mut self, _frame: &StreamsBlocked) -> Result<(), Error>

This is called when a STREAMS_BLOCKED frame had been received
source§

fn on_max_streams(&mut self, frame: &MaxStreams) -> Result<(), Error>

This is called when a MAX_STREAMS frame had been received
source§

fn poll_request( &mut self, stream_id: StreamId, api_call_context: &mut ConnectionApiCallContext<'_>, request: &mut Request<'_>, context: Option<&Context<'_>> ) -> Result<Response, StreamError>

source§

fn has_pending_streams(&self) -> bool

Returns whether or not streams have data to send
source§

impl<S: StreamTrait> Provider for AbstractStreamManager<S>

source§

impl<S: StreamTrait> Provider for AbstractStreamManager<S>

source§

fn timers<Q: Query>(&self, query: &mut Q) -> Result

Notifies the query of any timers owned by the provider Read more
source§

fn next_expiration(&self) -> Option<Timestamp>

Returns the next Timestamp at which the earliest timer is armed in the provider
source§

fn is_armed(&self) -> bool

Returns true if there are any timers armed
source§

fn armed_timer_count(&self) -> usize

Counts the number of armed timers in the provider
source§

fn for_each_timer<F>(&self, f: F)
where F: FnMut(&Timer) -> Result<(), QueryBreak>,

Iterates over each timer in the provider and calls the provided function
source§

impl<S> Send for AbstractStreamManager<S>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

source§

fn upcast(self) -> T

source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

source§

fn upcast_from(value: Counter<T, B>) -> T