pub enum LivenessTracking {
NotTrackedPerTask,
}Expand description
How a delivered task’s liveness is tracked, as a value the transport must interpret rather than a bare number it must remember the meaning of.
Distinct from TaskLiveness, which is
the tracker’s RECORD of an in-flight activity. This type says whether a
task is tracked that way at all.
§Why this is a type and not 0
ProtoActivityTask carries no heartbeat window, so a transport that needs
one — liminal’s DispatchRequest has the field — cannot derive it and must
assign it. Today’s assignment is 0, and it is correct only while liminal
dispatches stay outside the server’s per-task liveness tracker: the outbox
retry loop is their backstop, so the worker pumps no beats for them.
Written as an exhaustive enum so that the day a liminal dispatch is tracked
per task, adding the variant makes every match on it non-exhaustive and the
compiler names each site that has to decide again. A literal 0 would simply
keep compiling, silently claiming “no window” for a dispatch that now needs
one.
Variants§
NotTrackedPerTask
This transport does not track the task’s liveness per task; the caller’s own retry path is the backstop.
Implementations§
Source§impl LivenessTracking
impl LivenessTracking
Sourcepub const fn heartbeat_window_ms(self) -> u64
pub const fn heartbeat_window_ms(self) -> u64
The heartbeat window, in milliseconds, to stamp on the wire.
Zero means “pump no beats for this task” — which every consumer already
reads that way, and which is only ever correct for
LivenessTracking::NotTrackedPerTask.
Trait Implementations§
Source§impl Clone for LivenessTracking
impl Clone for LivenessTracking
Source§fn clone(&self) -> LivenessTracking
fn clone(&self) -> LivenessTracking
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LivenessTracking
Source§impl Debug for LivenessTracking
impl Debug for LivenessTracking
impl Eq for LivenessTracking
Source§impl PartialEq for LivenessTracking
impl PartialEq for LivenessTracking
impl StructuralPartialEq for LivenessTracking
Auto Trait Implementations§
impl Freeze for LivenessTracking
impl RefUnwindSafe for LivenessTracking
impl Send for LivenessTracking
impl Sync for LivenessTracking
impl Unpin for LivenessTracking
impl UnsafeUnpin for LivenessTracking
impl UnwindSafe for LivenessTracking
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
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>
T in a tonic::Request