pub struct RefTransaction {
pub push_seq: u64,
pub refname: String,
pub old_oid: Option<ObjectId>,
pub new_oid: Option<ObjectId>,
pub old_symref: Option<String>,
pub new_symref: Option<String>,
pub actor: String,
pub at_unix_ms: i64,
}Expand description
One row of the reference history: a single reference moving, once.
Fields§
§push_seq: u64Which frame of the source log this row came from. See COL_PUSH_SEQ.
refname: StringThe full reference name, refs/heads/main and not main.
old_oid: Option<ObjectId>The value before, absent for a creation and on a snapshot row.
new_oid: Option<ObjectId>The value after, absent for a deletion and for a symbolic target.
old_symref: Option<String>The symbolic value before, for a HEAD-shaped reference.
new_symref: Option<String>The symbolic value after.
actor: StringWho did it. COMPACTION_ACTOR means this is a snapshot row.
at_unix_ms: i64When, in milliseconds since the epoch.
Implementations§
Source§impl RefTransaction
impl RefTransaction
Sourcepub fn is_snapshot(&self) -> bool
pub fn is_snapshot(&self) -> bool
Whether this row is a compaction’s snapshot of state rather than a reference actually moving.
The test is the one COMPACTION_ACTOR documents: the actor and a
null previous value, both, since a genuine creation by a client also has
a null previous value and a client could in principle be named
gunnar:compaction.
Sourcepub fn is_deletion(&self) -> bool
pub fn is_deletion(&self) -> bool
Whether this row deletes the reference: no value after, either kind.