pub struct GraphAheadBehind {
pub ahead: usize,
pub behind: usize,
}Expand description
The result of checking the relationship between two commits in the commit graph.
Fields§
§ahead: usizeThe number of commits the given commit is ahead of the other.
behind: usizeThe number of commits the given commit is behind the other.
Implementations§
Source§impl GraphAheadBehind
impl GraphAheadBehind
Sourcepub fn is_linear(&self) -> bool
pub fn is_linear(&self) -> bool
Whether self represents a linear history between two commits.
The following three conditions are equivalent characterizations of a linear history:
- One commit is ahead and not behind of the other.
- One commit is behind and not ahead of the other.
- One commit can be “fast-forwarded” to the other.
Trait Implementations§
Source§impl Clone for GraphAheadBehind
impl Clone for GraphAheadBehind
Source§fn clone(&self) -> GraphAheadBehind
fn clone(&self) -> GraphAheadBehind
Returns a duplicate 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 moreSource§impl Debug for GraphAheadBehind
impl Debug for GraphAheadBehind
Source§impl Hash for GraphAheadBehind
impl Hash for GraphAheadBehind
Source§impl PartialEq for GraphAheadBehind
impl PartialEq for GraphAheadBehind
impl Copy for GraphAheadBehind
impl Eq for GraphAheadBehind
impl StructuralPartialEq for GraphAheadBehind
Auto Trait Implementations§
impl Freeze for GraphAheadBehind
impl RefUnwindSafe for GraphAheadBehind
impl Send for GraphAheadBehind
impl Sync for GraphAheadBehind
impl Unpin for GraphAheadBehind
impl UnwindSafe for GraphAheadBehind
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> 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> 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