Enum jujutsu_lib::index::IndexRef
source · [−]pub enum IndexRef<'a> {
Readonly(&'a ReadonlyIndex),
Mutable(&'a MutableIndex),
}Variants
Readonly(&'a ReadonlyIndex)
Mutable(&'a MutableIndex)
Implementations
sourceimpl<'a> IndexRef<'a>
impl<'a> IndexRef<'a>
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<'a>>
pub fn entry_by_pos(&self, pos: IndexPosition) -> IndexEntry<'a>
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<'a>ⓘ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,
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.
sourceimpl<'a> From<&'a ReadonlyIndex> for IndexRef<'a>
impl<'a> From<&'a ReadonlyIndex> for IndexRef<'a>
sourcefn from(index: &'a ReadonlyIndex) -> Self
fn from(index: &'a ReadonlyIndex) -> Self
Converts to this type from the input type.
impl<'a> Copy for IndexRef<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for IndexRef<'a>
impl<'a> Send for IndexRef<'a>
impl<'a> Sync for IndexRef<'a>
impl<'a> Unpin for IndexRef<'a>
impl<'a> UnwindSafe for IndexRef<'a>
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more