pub struct SessionHealth {
pub tasks_reported: usize,
pub stream_ended_at: Option<Instant>,
pub drain_received: bool,
}Expand description
Per-session health accounting written by the serve loop for the reconnect-aware caller’s drop-budget reset decision.
Fields§
§tasks_reported: usizeActivity tasks whose outcome report was sent on this session.
stream_ended_at: Option<Instant>When the receive stream ended or dropped, captured before in-flight handlers are drained — so post-drop draining never extends the session’s measured connected lifetime.
drain_received: boolLatched when a drain frame is observed on this session: the eventual stream end — clean OR abrupt — is then drain-class (the server announced it was going away), so the drop consumes no budget even if the post-drain reporting fails. Survives an error return because this is an out-parameter.
Trait Implementations§
Source§impl Debug for SessionHealth
impl Debug for SessionHealth
Source§impl Default for SessionHealth
impl Default for SessionHealth
Source§fn default() -> SessionHealth
fn default() -> SessionHealth
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionHealth
impl RefUnwindSafe for SessionHealth
impl Send for SessionHealth
impl Sync for SessionHealth
impl Unpin for SessionHealth
impl UnsafeUnpin for SessionHealth
impl UnwindSafe for SessionHealth
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request