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>,
}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.
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.
If the recorded status is Active but the tmux session is not alive,
returns Stopped.
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more