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>,
}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).
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
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
Compare self to
key and return true if they are equal.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