pub struct WorktreeState {Show 16 fields
pub path: String,
pub kind: WorktreeKind,
pub standing: Standing,
pub branch: Option<String>,
pub label: String,
pub head: Option<String>,
pub detached: bool,
pub expected_path: Option<String>,
pub exists: bool,
pub current: bool,
pub locked: Option<String>,
pub prunable: Option<String>,
pub dirty: Option<DirtyState>,
pub upstream: Option<UpstreamState>,
pub issue: Option<String>,
pub diagnostics: Vec<TopologyDiagnostic>,
}Expand description
One work tree, as the topology sees it.
Fields§
§path: StringAbsolute, as git holds it.
kind: WorktreeKindPrimary or linked.
standing: StandingWhere it stands against the topology.
branch: Option<String>The branch checked out here, short. Absent when detached.
label: StringThe name it is shown under: the branch, or detached/<short commit>.
head: Option<String>The commit checked out here.
detached: boolHEAD is detached here.
expected_path: Option<String>Where this branch’s work tree belongs. Absent when detached, or for the primary checkout on the trunk.
exists: boolThe directory git registered still exists on disk.
current: boolThe call came from inside this work tree.
locked: Option<String>Locked, with git’s reason; an empty string when it recorded none.
prunable: Option<String>Prunable, with git’s reason.
dirty: Option<DirtyState>Uncommitted work here. Absent when it was not asked for: it costs one subprocess per work tree, and a topology check does not need it.
upstream: Option<UpstreamState>The branch’s upstream and its distance from it.
issue: Option<String>The issue this branch provably names: a path component of the branch equal to an
issue id of .ai/repo/project/issues/, or beginning with it and a hyphen. Nothing
is inferred from similarity.
diagnostics: Vec<TopologyDiagnostic>What is wrong with this work tree, if anything.
Trait Implementations§
Source§impl Clone for WorktreeState
impl Clone for WorktreeState
Source§fn clone(&self) -> WorktreeState
fn clone(&self) -> WorktreeState
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 WorktreeState
impl Debug for WorktreeState
Source§impl<'de> Deserialize<'de> for WorktreeState
impl<'de> Deserialize<'de> for WorktreeState
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 WorktreeState
Source§impl JsonSchema for WorktreeState
impl JsonSchema for WorktreeState
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for WorktreeState
impl PartialEq for WorktreeState
Source§fn eq(&self, other: &WorktreeState) -> bool
fn eq(&self, other: &WorktreeState) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for WorktreeState
impl Serialize for WorktreeState
impl StructuralPartialEq for WorktreeState
Auto Trait Implementations§
impl Freeze for WorktreeState
impl RefUnwindSafe for WorktreeState
impl Send for WorktreeState
impl Sync for WorktreeState
impl Unpin for WorktreeState
impl UnsafeUnpin for WorktreeState
impl UnwindSafe for WorktreeState
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.