Struct branchless::core::graph::Node[][src]

pub struct Node<'repo> {
    pub commit: Commit<'repo>,
    pub parent: Option<Oid>,
    pub children: HashSet<Oid>,
    pub is_main: bool,
    pub is_visible: bool,
    pub event: Option<Event>,
}

Node contained in the smartlog commit graph.

Fields

commit: Commit<'repo>

The underlying commit object.

parent: Option<Oid>

The OID of the parent node in the smartlog commit graph.

This is different from inspecting commit.parents(), since the smartlog will hide most nodes from the commit graph, including parent nodes.

children: HashSet<Oid>

The OIDs of the children nodes in the smartlog commit graph.

is_main: bool

Indicates that this is a commit to the main branch.

These commits are considered to be immutable and should never leave the main state. However, this can still happen sometimes if the user’s workflow is different than expected.

is_visible: bool

Indicates that this commit should be considered “visible”.

A visible commit is a commit that hasn’t been checked into the main branch, but the user is actively working on. We may infer this from user behavior, e.g. they committed something recently, so they are now working on it.

In contrast, a hidden commit is a commit that hasn’t been checked into the main branch, and the user is no longer working on. We may infer this from user behavior, e.g. they have rebased a commit and no longer want to see the old version of that commit. The user can also manually hide commits.

Occasionally, a main commit can be marked as hidden, such as if a commit in the main branch has been rewritten. We don’t expect this to happen in the monorepo workflow, but it can happen in other workflows where you commit directly to the main branch and then later rewrite the commit.

event: Option<Event>

The latest event to affect this commit.

It’s possible that no event affected this commit, and it was simply visible due to a reference pointing to it. In that case, this field is None.

Trait Implementations

impl<'repo> Debug for Node<'repo>[src]

Auto Trait Implementations

impl<'repo> RefUnwindSafe for Node<'repo>

impl<'repo> !Send for Node<'repo>

impl<'repo> !Sync for Node<'repo>

impl<'repo> Unpin for Node<'repo>

impl<'repo> UnwindSafe for Node<'repo>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> With for T