pub enum DisplayStatus {
Active,
Paused,
Stopped,
Stale,
}Expand description
The status git-paw displays for a session, derived from the persisted
receipt status combined with a live tmux probe (design D4 of
session-bugfixes).
Distinct from SessionStatus (the on-disk receipt value): a receipt
that claims Active but whose tmux session has vanished surfaces as
DisplayStatus::Stale rather than silently downgrading to Stopped,
so the user can tell a clean stop apart from a crashed / carried-over
session.
Variants§
Active
Receipt says active and the tmux session is alive.
Paused
Receipt says paused and the tmux session is alive.
Stopped
Receipt says stopped, or a paused session whose tmux server died.
Stale
Receipt claims active but the tmux session is gone (crash or release-boundary carry-over).
Implementations§
Source§impl DisplayStatus
impl DisplayStatus
Sourcepub fn from_receipt(status: &SessionStatus, liveness: SessionLiveness) -> Self
pub fn from_receipt(status: &SessionStatus, liveness: SessionLiveness) -> Self
Resolves the display status from the persisted receipt status and a tmux-liveness probe.
🔴 Stale surfaces only for Active receipts whose probe returns
crate::tmux::SessionLiveness::Stale. An Indeterminate probe (the
tmux binary is missing) never yields Stale: it preserves the
pre-existing “tmux not alive” display by downgrading active/paused to
Stopped.
Trait Implementations§
Source§impl Clone for DisplayStatus
impl Clone for DisplayStatus
Source§fn clone(&self) -> DisplayStatus
fn clone(&self) -> DisplayStatus
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 DisplayStatus
Source§impl Debug for DisplayStatus
impl Debug for DisplayStatus
Source§impl Display for DisplayStatus
impl Display for DisplayStatus
impl Eq for DisplayStatus
Source§impl PartialEq for DisplayStatus
impl PartialEq for DisplayStatus
Source§fn eq(&self, other: &DisplayStatus) -> bool
fn eq(&self, other: &DisplayStatus) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DisplayStatus
Auto Trait Implementations§
impl Freeze for DisplayStatus
impl RefUnwindSafe for DisplayStatus
impl Send for DisplayStatus
impl Sync for DisplayStatus
impl Unpin for DisplayStatus
impl UnsafeUnpin for DisplayStatus
impl UnwindSafe for DisplayStatus
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
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more