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,
}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, including the ones whose owner is gone. 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.
Trait Implementations§
Source§impl Clone for SessionHolder
impl Clone for SessionHolder
Source§fn clone(&self) -> SessionHolder
fn clone(&self) -> SessionHolder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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
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§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.