pub struct State {
pub head: Head,
pub config: BString,
pub references: Vec<Reference>,
pub commits: Vec<Commit>,
pub index: Vec<IndexEntry>,
pub index_tree: Option<ObjectId>,
pub worktree: Vec<WorktreeEntry>,
/* private fields */
}Expand description
All relevant observable state of a repository and its worktree.
Fields§
§head: HeadThe current HEAD, including whether it is attached, detached, or unborn.
config: BStringThe contents of the repository’s common config file, with locations normalized and generated keys removed.
references: Vec<Reference>Every reference below refs/, sorted by name.
commits: Vec<Commit>Raw commit objects reachable from HEAD or any reference, sorted by object ID.
The raw data retains the tree, parents, identities, dates, headers, and message.
index: Vec<IndexEntry>Every index entry and stage, sorted in index order.
index_tree: Option<ObjectId>The tree represented by a conflict-free index, computed without writing objects.
worktree: Vec<WorktreeEntry>Exact filesystem entries below the worktree, excluding .git administration entries.
Trait Implementations§
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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.