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 path_backing(&self) -> &PathStorage
pub fn take_path_backing(&mut self) -> PathStorage
pub fn return_path_backing(&mut self, backing: PathStorage)
pub fn entries_with_paths_by_filter_map<'a, T>(
&'a self,
filter_map: impl FnMut(&'a BStr, &Entry) -> Option<T> + 'a
) -> impl Iterator<Item = (&'a BStr, T)> + 'a
pub fn entries_mut(&mut self) -> &mut [Entry]
pub fn entries_mut_with_paths(
&mut self
) -> impl Iterator<Item = (&mut Entry, &BStr)>
pub fn entries_mut_with_paths_in<'state, 'backing>(
&'state mut self,
backing: &'backing PathStorage
) -> impl Iterator<Item = (&'state mut Entry, &'backing BStr)>
pub fn tree(&self) -> Option<&Tree>
pub fn link(&self) -> Option<&Link>
pub fn resolve_undo(&self) -> Option<&Vec<ResolvePath>>
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