pub struct WindowsConnectionSession { /* private fields */ }Expand description
Shareable lifecycle fence for one active native connection generation.
Implementations§
Source§impl WindowsConnectionSession
impl WindowsConnectionSession
Sourcepub fn generation(&self) -> SessionGeneration
pub fn generation(&self) -> SessionGeneration
Returns the durable generation fence owned by this connection.
Sourcepub fn active_callbacks(&self) -> usize
pub fn active_callbacks(&self) -> usize
Returns the number of accepted callback requests still owned by downstream work.
Sourcepub fn queue_metrics(&self) -> WindowsCallbackQueueMetrics
pub fn queue_metrics(&self) -> WindowsCallbackQueueMetrics
Returns a point-in-time bounded callback ingress snapshot.
Sourcepub fn begin_callback(
&self,
callback_generation: SessionGeneration,
) -> Result<WindowsCallbackLease>
pub fn begin_callback( &self, callback_generation: SessionGeneration, ) -> Result<WindowsCallbackLease>
Accepts one callback only while this exact generation is accepting new work.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub fn begin_closing(&self) -> bool
pub fn begin_closing(&self) -> bool
Moves Accepting -> Closing, rejecting all later callback ingress.
Returns true only for the first close request. Repeated calls are idempotent.
Sourcepub fn mark_disconnected(&self) -> Result<()>
pub fn mark_disconnected(&self) -> Result<()>
Records successful native disconnect and begins draining accepted work.
The session closes immediately when no callback leases remain; otherwise the final lease
release performs Draining -> Closed.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Trait Implementations§
Source§impl Clone for WindowsConnectionSession
impl Clone for WindowsConnectionSession
Source§fn clone(&self) -> WindowsConnectionSession
fn clone(&self) -> WindowsConnectionSession
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more