pub struct Http2StreamManager {
pub active_streams: HashMap<u32, StreamInfo>,
pub push_promises: HashMap<u32, PushPromise>,
pub max_concurrent_streams: usize,
pub connection_window_size: u32,
}Expand description
HTTP/2 stream management for bidirectional communication
Fields§
§active_streams: HashMap<u32, StreamInfo>§push_promises: HashMap<u32, PushPromise>§max_concurrent_streams: usize§connection_window_size: u32Implementations§
Source§impl Http2StreamManager
impl Http2StreamManager
pub fn new(max_concurrent_streams: usize) -> Self
pub fn can_create_stream(&self) -> bool
pub fn add_stream(&mut self, stream_id: u32, method: String, path: String)
pub fn add_push_promise(&mut self, stream_id: u32, promise: PushPromise)
pub fn close_stream(&mut self, stream_id: u32)
pub fn update_stream_bytes(&mut self, stream_id: u32, sent: u64, received: u64)
pub fn get_stream_stats(&self) -> (usize, u64, u64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Http2StreamManager
impl RefUnwindSafe for Http2StreamManager
impl Send for Http2StreamManager
impl Sync for Http2StreamManager
impl Unpin for Http2StreamManager
impl UnsafeUnpin for Http2StreamManager
impl UnwindSafe for Http2StreamManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].