Struct git_repository::index::State
source · [−]pub struct State { /* private fields */ }
Expand description
An in-memory cache of a fully parsed git index file.
As opposed to a snapshot, it’s meant to be altered and eventually be written back to disk or converted into a tree. We treat index and its state synonymous.
Implementations
sourceimpl State
impl State
pub fn version(&self) -> Version
pub fn entries(&self) -> &[Entry]
pub fn entries_mut(&mut self) -> &mut [Entry]
pub fn entries_mut_with_paths(
&mut self
) -> impl Iterator<Item = (&mut Entry, &BStr)>
pub fn tree(&self) -> Option<&Tree>
pub fn link(&self) -> Option<&Link>
pub fn resolve_undo(&self) -> Option<&Vec<ResolvePath, Global>>
pub fn untracked(&self) -> Option<&UntrackedCache>
pub fn fs_monitor(&self) -> Option<&FsMonitor>
Auto Trait Implementations
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more