Enum branchless::core::eventlog::Event[][src]

pub enum Event {
    RewriteEvent {
        timestamp: f64,
        event_tx_id: EventTransactionId,
        old_commit_oid: Oid,
        new_commit_oid: Oid,
    },
    RefUpdateEvent {
        timestamp: f64,
        event_tx_id: EventTransactionId,
        ref_name: String,
        old_ref: Option<String>,
        new_ref: Option<String>,
        message: Option<String>,
    },
    CommitEvent {
        timestamp: f64,
        event_tx_id: EventTransactionId,
        commit_oid: Oid,
    },
    HideEvent {
        timestamp: f64,
        event_tx_id: EventTransactionId,
        commit_oid: Oid,
    },
    UnhideEvent {
        timestamp: f64,
        event_tx_id: EventTransactionId,
        commit_oid: Oid,
    },
}
Expand description

An event that occurred to one of the commits in the repository.

Variants

RewriteEvent

Indicates that the commit was rewritten.

Examples of rewriting include rebases and amended commits.

We typically want to mark the new version of the commit as visible and the old version of the commit as hidden.

Show fields

Fields of RewriteEvent

timestamp: f64

The timestamp of the event.

event_tx_id: EventTransactionId

The transaction ID of the event.

old_commit_oid: Oid

The OID of the commit before the rewrite.

new_commit_oid: Oid

The OID of the commit after the rewrite.

RefUpdateEvent

Indicates that a reference was updated.

The most important reference we track is HEAD. In principle, we can also track branch moves in this way, but Git doesn’t support the appropriate hook until v2.29 (reference-transaction).

Show fields

Fields of RefUpdateEvent

timestamp: f64

The timestamp of the event.

event_tx_id: EventTransactionId

The transaction ID of the event.

ref_name: String

The full name of the reference that was updated.

For example, HEAD or refs/heads/master.

old_ref: Option<String>

The old referent.

May be an OID (in the case of a direct reference) or another reference name (in the case of a symbolic reference).

new_ref: Option<String>

The updated referent.

This may not be different from the old referent.

May be an OID (in the case of a direct reference) or another reference name (in the case of a symbolic reference).

message: Option<String>

A message associated with the rewrite, if any.

CommitEvent

Indicate that the user made a commit.

User commits should be marked as visible.

Show fields

Fields of CommitEvent

timestamp: f64

The timestamp of the event.

event_tx_id: EventTransactionId

The transaction ID of the event.

commit_oid: Oid

The new commit OID.

HideEvent

Indicates that a commit was explicitly hidden by the user.

If the commit in question was not already visible, then this has no practical effect.

Show fields

Fields of HideEvent

timestamp: f64

The timestamp of the event.

event_tx_id: EventTransactionId

The transaction ID of the event.

commit_oid: Oid

The OID of the commit that was hidden.

UnhideEvent

Indicates that a commit was explicitly un-hidden by the user.

If the commit in question was not already hidden, then this has no practical effect.

Show fields

Fields of UnhideEvent

timestamp: f64

The timestamp of the event.

event_tx_id: EventTransactionId

The transaction ID of the event.

commit_oid: Oid

The OID of the commit that was unhidden.

Implementations

Get the timestamp associated with this event.

Get the event transaction ID associated with this event.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Calls the given closure and return the result. Read more

Calls the given closure on self.

Calls the given closure on self.

Calls the given closure if condition == true.