pub struct LongHoldConfig {
pub default_hold: Duration,
pub max_hold: Duration,
pub heartbeat_interval: Duration,
pub heartbeat_miss_threshold: u32,
pub keepalive_on_idle: bool,
}Expand description
Tuning for long-running (suspend/resume-capable) sessions and tasks — how long a poll/suspend may hold, how often heartbeats are expected, and whether idle tasks are kept alive across a detach.
Fields§
§default_hold: DurationDefault wait duration used by long-poll style waits when the caller does not specify one explicitly.
max_hold: DurationUpper bound on how long a single suspend/poll wait may block.
heartbeat_interval: DurationExpected cadence of Engine::heartbeat calls from an attached
session; consumed by Engine::start_detach_loop.
heartbeat_miss_threshold: u32Number of missed heartbeat intervals tolerated before the detach
loop flips a session’s attached flag to false.
keepalive_on_idle: boolWhen true, a task survives (its state is retained) across a
session detach, so a later reattach can resume it in place.
Trait Implementations§
Source§impl Clone for LongHoldConfig
impl Clone for LongHoldConfig
Source§fn clone(&self) -> LongHoldConfig
fn clone(&self) -> LongHoldConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LongHoldConfig
impl Debug for LongHoldConfig
Auto Trait Implementations§
impl Freeze for LongHoldConfig
impl RefUnwindSafe for LongHoldConfig
impl Send for LongHoldConfig
impl Sync for LongHoldConfig
impl Unpin for LongHoldConfig
impl UnsafeUnpin for LongHoldConfig
impl UnwindSafe for LongHoldConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more