pub struct Session {
pub session_name: String,
pub repo_path: PathBuf,
pub project_name: String,
pub created_at: SystemTime,
pub status: SessionStatus,
pub worktrees: Vec<WorktreeEntry>,
pub broker_port: Option<u16>,
pub broker_bind: Option<String>,
pub broker_log_path: Option<PathBuf>,
pub mode: SessionMode,
pub dashboard_pane: Option<u32>,
}Expand description
Persisted session state for a git-paw session.
Fields§
§session_name: StringTmux session name (also used as the filename stem).
repo_path: PathBufAbsolute path to the repository root.
project_name: StringHuman-readable project name (derived from the repo directory name).
created_at: SystemTimeISO 8601 timestamp of session creation (UTC).
status: SessionStatusCurrent session status.
worktrees: Vec<WorktreeEntry>Worktrees managed by this session.
broker_port: Option<u16>Broker port (when broker is enabled).
broker_bind: Option<String>Broker bind address (when broker is enabled).
broker_log_path: Option<PathBuf>Path to the broker log file (when broker is enabled).
mode: SessionModePane-layout shape this session was launched with. Missing on sessions
saved by v0.4 binaries, in which case SessionMode::Bare is assumed
for backwards compatibility.
dashboard_pane: Option<u32>Pane index of the dashboard pane (when broker is enabled). Used by the
restart-from-pause flow to recreate the dashboard pane in its original
position. None on v0.4-saved sessions; consumers SHALL default to 0.
Implementations§
Source§impl Session
impl Session
Sourcepub fn effective_status(
&self,
is_tmux_alive: impl Fn(&str) -> bool,
) -> SessionStatus
pub fn effective_status( &self, is_tmux_alive: impl Fn(&str) -> bool, ) -> SessionStatus
Returns the effective status by combining the on-disk status with a tmux liveness check.
Active or Paused downgrade to Stopped when tmux is not alive
(a paused session whose tmux server died has no live CLI panes to
resume into). Stopped is unchanged regardless of tmux liveness.
Sourcepub fn created_at_iso8601(&self) -> Option<String>
pub fn created_at_iso8601(&self) -> Option<String>
Returns the session’s creation timestamp formatted as an ISO 8601 UTC
string, or None if the timestamp is before the Unix epoch. Used by
the stale-receipt invalidation notice (design D5).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Session
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more