Struct jujutsu::templater::CommitOrChangeId
source · pub struct CommitOrChangeId<'a> { /* private fields */ }
Expand description
Type-erased CommitId
/ChangeId
.
Implementations§
source§impl<'a> CommitOrChangeId<'a>
impl<'a> CommitOrChangeId<'a>
pub fn commit_id(repo: &'a dyn Repo, id: &CommitId) -> Self
pub fn change_id(repo: &'a dyn Repo, id: &ChangeId) -> Self
pub fn hex(&self) -> String
pub fn short(&self, total_len: usize) -> String
sourcepub fn shortest(&self, total_len: usize) -> ShortestIdPrefix
pub fn shortest(&self, total_len: usize) -> ShortestIdPrefix
The length of the id printed will be the maximum of total_len
and the
length of the shortest unique prefix
Trait Implementations§
source§impl<'a> Clone for CommitOrChangeId<'a>
impl<'a> Clone for CommitOrChangeId<'a>
source§fn clone(&self) -> CommitOrChangeId<'a>
fn clone(&self) -> CommitOrChangeId<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> !RefUnwindSafe for CommitOrChangeId<'a>
impl<'a> !Send for CommitOrChangeId<'a>
impl<'a> !Sync for CommitOrChangeId<'a>
impl<'a> Unpin for CommitOrChangeId<'a>
impl<'a> !UnwindSafe for CommitOrChangeId<'a>
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