pub struct Commit { /* private fields */ }
Implementations§
Source§impl Commit
impl Commit
pub fn new(store: Arc<Store>, id: CommitId, data: Arc<Commit>) -> Self
pub fn store(&self) -> &Arc<Store>
pub fn id(&self) -> &CommitId
pub fn parent_ids(&self) -> &[CommitId]
pub fn parents(&self) -> impl Iterator<Item = BackendResult<Commit>> + use<'_>
pub fn tree(&self) -> BackendResult<MergedTree>
pub fn tree_id(&self) -> &MergedTreeId
Sourcepub fn parent_tree(&self, repo: &dyn Repo) -> BackendResult<MergedTree>
pub fn parent_tree(&self, repo: &dyn Repo) -> BackendResult<MergedTree>
Return the parent tree, merging the parent trees if there are multiple parents.
Sourcepub fn is_empty(&self, repo: &dyn Repo) -> BackendResult<bool>
pub fn is_empty(&self, repo: &dyn Repo) -> BackendResult<bool>
Returns whether commit’s content is empty. Commit description is not taken into consideration.
pub fn has_conflict(&self) -> BackendResult<bool>
pub fn change_id(&self) -> &ChangeId
pub fn store_commit(&self) -> &Arc<Commit>
pub fn description(&self) -> &str
pub fn committer(&self) -> &Signature
A commit is hidden if its commit id is not in the change id index.
Sourcepub fn is_discardable(&self, repo: &dyn Repo) -> BackendResult<bool>
pub fn is_discardable(&self, repo: &dyn Repo) -> BackendResult<bool>
A commit is discardable if it has no change from its parent, and an empty description.
Sourcepub fn verification(&self) -> SignResult<Option<Verification>>
pub fn verification(&self) -> SignResult<Option<Verification>>
A slow (but cached) way to get the full verification.
Trait Implementations§
Source§impl Ord for Commit
impl Ord for Commit
Source§impl PartialOrd for Commit
impl PartialOrd for Commit
impl Eq for Commit
Auto Trait Implementations§
impl Freeze for Commit
impl !RefUnwindSafe for Commit
impl Send for Commit
impl Sync for Commit
impl Unpin for Commit
impl !UnwindSafe for Commit
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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