pub struct GitContext {
pub workdir: PathBuf,
pub head_sha: Option<String>,
pub head_branch: Option<String>,
pub remotes: Vec<(String, String)>,
}Expand description
The pure cached view of a repository (R6): no libgit2 handle, no locks, no IO to read — render and command decisions consult this, while every native read runs on a worker. Equality is meaningful: an unchanged context (same HEAD, branch, remotes) means cached diffs stay valid.
Fields§
§workdir: PathBuf§head_sha: Option<String>§head_branch: Option<String>§remotes: Vec<(String, String)>(name, url) pairs; permalink selection is a pure fold over them.
Implementations§
Trait Implementations§
Source§impl Clone for GitContext
impl Clone for GitContext
Source§fn clone(&self) -> GitContext
fn clone(&self) -> GitContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GitContext
impl Debug for GitContext
Source§impl<'de> Deserialize<'de> for GitContext
impl<'de> Deserialize<'de> for GitContext
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 GitContext
Source§impl PartialEq for GitContext
impl PartialEq for GitContext
Source§impl Serialize for GitContext
impl Serialize for GitContext
impl StructuralPartialEq for GitContext
Auto Trait Implementations§
impl Freeze for GitContext
impl RefUnwindSafe for GitContext
impl Send for GitContext
impl Sync for GitContext
impl Unpin for GitContext
impl UnsafeUnpin for GitContext
impl UnwindSafe for GitContext
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