pub struct SessionHolder {
pub token: SessionToken,
pub identity: String,
pub branch: String,
pub worktree: PathBuf,
pub owner_pid: u32,
pub state: Lifecycle,
pub liveness: Liveness,
pub labels: BTreeMap<String, String>,
}Expand description
One session that holds a repository’s workspace, as an enumeration reports it.
A SessionRecord answers about a session somebody already has the token for;
this answers the question before that one — who is in this repository — for
every session the host has recorded that anybody is left to answer for: one
whose owner process is still there, and one a live process is still working
inside. A record with neither is forgotten by the enumeration rather than
reported above every launch. It is what onevcs session holders prints, so a
caller reading the command’s JSON and a caller embedding
crate::session_holders read the same shape.
Fields§
§token: SessionTokenThe handle this session is addressed by, and the one every command that takes a session takes.
identity: StringThe identity key the session belongs to.
branch: StringThe branch its worktree has checked out.
worktree: PathBufThe worktree the change is made in. A closed session’s is gone; its branch is not.
owner_pid: u32The process that opened it, so a diagnostic can name who to look for.
state: LifecycleWhere the session is in its life. Spelled state because that is the key
onevcs session holders --json prints it under.
liveness: LivenessWhether the process that opened it is still there.
labels: BTreeMap<String, String>The labels the session was opened with. Always written — an empty object for a session opened without any, and for every record written before there was a field to write.
Trait Implementations§
Source§impl Clone for SessionHolder
impl Clone for SessionHolder
Source§impl Debug for SessionHolder
impl Debug for SessionHolder
Source§impl<'de> Deserialize<'de> for SessionHolder
impl<'de> Deserialize<'de> for SessionHolder
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 SessionHolder
Source§impl PartialEq for SessionHolder
impl PartialEq for SessionHolder
Source§impl Serialize for SessionHolder
impl Serialize for SessionHolder
impl StructuralPartialEq for SessionHolder
Auto Trait Implementations§
impl Freeze for SessionHolder
impl RefUnwindSafe for SessionHolder
impl Send for SessionHolder
impl Sync for SessionHolder
impl Unpin for SessionHolder
impl UnsafeUnpin for SessionHolder
impl UnwindSafe for SessionHolder
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,
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.