Struct jj_lib::id_prefix::IdPrefixContext
source · pub struct IdPrefixContext { /* private fields */ }
Implementations§
source§impl IdPrefixContext
impl IdPrefixContext
pub fn new(extensions: Arc<RevsetExtensions>) -> Self
pub fn disambiguate_within(self, expression: Rc<RevsetExpression>) -> Self
sourcepub fn resolve_commit_prefix(
&self,
repo: &dyn Repo,
prefix: &HexPrefix,
) -> PrefixResolution<CommitId>
pub fn resolve_commit_prefix( &self, repo: &dyn Repo, prefix: &HexPrefix, ) -> PrefixResolution<CommitId>
Resolve an unambiguous commit ID prefix.
sourcepub fn shortest_commit_prefix_len(
&self,
repo: &dyn Repo,
commit_id: &CommitId,
) -> usize
pub fn shortest_commit_prefix_len( &self, repo: &dyn Repo, commit_id: &CommitId, ) -> usize
Returns the shortest length of a prefix of commit_id
that
can still be resolved by resolve_commit_prefix()
.
sourcepub fn resolve_change_prefix(
&self,
repo: &dyn Repo,
prefix: &HexPrefix,
) -> PrefixResolution<Vec<CommitId>>
pub fn resolve_change_prefix( &self, repo: &dyn Repo, prefix: &HexPrefix, ) -> PrefixResolution<Vec<CommitId>>
Resolve an unambiguous change ID prefix to the commit IDs in the revset.
sourcepub fn shortest_change_prefix_len(
&self,
repo: &dyn Repo,
change_id: &ChangeId,
) -> usize
pub fn shortest_change_prefix_len( &self, repo: &dyn Repo, change_id: &ChangeId, ) -> usize
Returns the shortest length of a prefix of change_id
that
can still be resolved by resolve_change_prefix()
.
Trait Implementations§
source§impl Default for IdPrefixContext
impl Default for IdPrefixContext
source§fn default() -> IdPrefixContext
fn default() -> IdPrefixContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for IdPrefixContext
impl !RefUnwindSafe for IdPrefixContext
impl !Send for IdPrefixContext
impl !Sync for IdPrefixContext
impl Unpin for IdPrefixContext
impl !UnwindSafe for IdPrefixContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more