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,
    },
}

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.

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).

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.

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.

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.

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

impl Event[src]

pub fn get_timestamp(&self) -> SystemTime[src]

Get the timestamp associated with this event.

pub fn get_event_tx_id(&self) -> EventTransactionId[src]

Get the event transaction ID associated with this event.

Trait Implementations

impl Clone for Event[src]

impl Debug for Event[src]

impl PartialEq<Event> for Event[src]

impl StructuralPartialEq for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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