pub struct GitStateMirror {
pub head: Option<GitHead>,
pub refs: BTreeMap<String, GitRefState>,
pub op: Option<GitOpState>,
pub status: Vec<GitStatusEntry>,
pub upstreams: BTreeMap<String, GitUpstreamState>,
pub stashes: Vec<GitStashEntry>,
pub remotes: BTreeMap<String, GitRemoteState>,
pub flags: u8,
/* private fields */
}Expand description
The complete client obligation for GIT_STATE: each snapshot replaces
the whole typed state — no diffing, no staging (docs/git.md
“GIT_STATE / GIT_ACK”).
Fields§
§head: Option<GitHead>§refs: BTreeMap<String, GitRefState>Keyed by escaped ref name.
op: Option<GitOpState>§status: Vec<GitStatusEntry>§upstreams: BTreeMap<String, GitUpstreamState>Keyed by local branch ref name (joins refs).
stashes: Vec<GitStashEntry>§remotes: BTreeMap<String, GitRemoteState>Keyed by remote name; populated with the REMOTES open flag.
flags: u8The last snapshot’s truncation flags (GIT_STATE_*_TRUNCATED).
Implementations§
Source§impl GitStateMirror
impl GitStateMirror
pub fn new() -> Self
Sourcepub fn apply_state(&mut self, msg: &[u8]) -> GitStateApply
pub fn apply_state(&mut self, msg: &[u8]) -> GitStateApply
Apply one GIT_STATE message (starting at the opcode byte),
replacing the whole state. A snapshot too large for one message
arrives as several PARTIAL chunks sharing a state_id; those are
buffered and installed together.
Trait Implementations§
Source§impl Clone for GitStateMirror
impl Clone for GitStateMirror
Source§fn clone(&self) -> GitStateMirror
fn clone(&self) -> GitStateMirror
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 GitStateMirror
impl Debug for GitStateMirror
Source§impl Default for GitStateMirror
impl Default for GitStateMirror
Source§fn default() -> GitStateMirror
fn default() -> GitStateMirror
Returns the “default value” for a type. Read more
impl Eq for GitStateMirror
Source§impl PartialEq for GitStateMirror
impl PartialEq for GitStateMirror
impl StructuralPartialEq for GitStateMirror
Auto Trait Implementations§
impl Freeze for GitStateMirror
impl RefUnwindSafe for GitStateMirror
impl Send for GitStateMirror
impl Sync for GitStateMirror
impl Unpin for GitStateMirror
impl UnsafeUnpin for GitStateMirror
impl UnwindSafe for GitStateMirror
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