Struct jujutsu_lib::index::MutableIndex
source · [−]pub struct MutableIndex { /* private fields */ }Implementations
sourceimpl MutableIndex
impl MutableIndex
pub fn incremental(parent_file: Arc<ReadonlyIndex>) -> Self
pub fn as_index_ref(&self) -> IndexRef<'_>
pub fn add_commit(&mut self, commit: &Commit)
pub fn merge_in(&mut self, other: &Arc<ReadonlyIndex>)
pub fn save_in(self, dir: PathBuf) -> Result<Arc<ReadonlyIndex>>
pub fn num_commits(&self) -> u32
pub fn stats(&self) -> IndexStats
pub fn commit_id_to_pos(&self, commit_id: &CommitId) -> Option<IndexPosition>
pub fn resolve_prefix(&self, prefix: &HexPrefix) -> PrefixResolution<CommitId>
pub fn entry_by_id(&self, commit_id: &CommitId) -> Option<IndexEntry<'_>>
pub fn entry_by_pos(&self, pos: IndexPosition) -> IndexEntry<'_>
pub fn has_id(&self, commit_id: &CommitId) -> bool
pub fn is_ancestor(
&self,
ancestor_id: &CommitId,
descendant_id: &CommitId
) -> bool
pub fn common_ancestors(
&self,
set1: &[CommitId],
set2: &[CommitId]
) -> Vec<CommitId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn walk_revs(
&self,
wanted: &[CommitId],
unwanted: &[CommitId]
) -> RevWalk<'_>ⓘNotable traits for RevWalk<'a>impl<'a> Iterator for RevWalk<'a> type Item = IndexEntry<'a>;
pub fn heads<'candidates>(
&self,
candidates: impl IntoIterator<Item = &'candidates CommitId>
) -> Vec<CommitId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn topo_order<'candidates>(
&self,
input: impl IntoIterator<Item = &'candidates CommitId>
) -> Vec<IndexEntry<'_>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Trait Implementations
sourceimpl<'a> From<&'a MutableIndex> for IndexRef<'a>
impl<'a> From<&'a MutableIndex> for IndexRef<'a>
sourcefn from(index: &'a MutableIndex) -> Self
fn from(index: &'a MutableIndex) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for MutableIndex
impl Send for MutableIndex
impl Sync for MutableIndex
impl Unpin for MutableIndex
impl UnwindSafe for MutableIndex
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