Enum jujutsu_lib::index::IndexRef
source · pub enum IndexRef<'a> {
Readonly(&'a ReadonlyIndex),
Mutable(&'a MutableIndex),
}Variants§
Readonly(&'a ReadonlyIndex)
Mutable(&'a MutableIndex)
Implementations§
source§impl<'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> ⓘ
pub fn walk_revs(&self, wanted: &[CommitId], unwanted: &[CommitId]) -> RevWalk<'a> ⓘ
pub fn heads<'candidates>(
&self,
candidates: impl IntoIterator<Item = &'candidates CommitId>
) -> Vec<CommitId> ⓘ
Trait Implementations§
source§impl<'a> From<&'a MutableIndex> for IndexRef<'a>
impl<'a> From<&'a MutableIndex> for IndexRef<'a>
source§fn from(index: &'a MutableIndex) -> Self
fn from(index: &'a MutableIndex) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a ReadonlyIndex> for IndexRef<'a>
impl<'a> From<&'a ReadonlyIndex> for IndexRef<'a>
source§fn from(index: &'a ReadonlyIndex) -> Self
fn from(index: &'a ReadonlyIndex) -> Self
Converts to this type from the input type.