Skip to main content

Record

Enum Record 

Source
pub enum Record {
Show 20 variants Prepared(Box<Transaction>), Advance { txn: TxnId, epoch: u64, to: TxnState, note: String, withdrawn_for: Option<TxnId>, }, Takeover { txn: TxnId, from_epoch: u64, lease: Lease, }, Renew { txn: TxnId, epoch: u64, worker_pid: Option<u32>, boot_at: Timestamp, }, OpBegin { op: OpId, call: String, }, OpAck { op: OpId, outcome: Outcome, }, OverrideSet(Override), OverrideLifted(UnitId), Incident(Incident), KnownGood(GenerationId), LiveTested(Option<GenerationId>), AcceptedBaseline(Option<GenerationId>), SecurityFloor(Option<GenerationId>), ExternalAccepted { seq: u64, digest: Hash, }, TokenUsed { nonce: [u8; 16], expires: Timestamp, approver: u64, txn: u64, }, AgentStarted { name: String, instance: [u8; 16], by: u32, }, Resolved { txn: TxnId, resolution: Resolution, by: Actor, }, Reconciliation(Reconciliation), HoldApplied { unit: UnitId, by: HoldBy, }, HoldLifted { unit: UnitId, reason: String, },
}

Variants§

§

Prepared(Box<Transaction>)

The transaction exists from this record on (§12 step 4).

§

Advance

Fields

§txn: TxnId
§epoch: u64
§note: String
§withdrawn_for: Option<TxnId>

§12f: on a Rejected(Interrupted), the rollback it was withdrawn for; the daemon prepares it again once that rollback is terminal, across a restart too. Absent in records from before it.

§

Takeover

Compare-and-swap on the epoch: valid only if from_epoch is current.

Fields

§txn: TxnId
§from_epoch: u64
§lease: Lease
§

Renew

Fields

§txn: TxnId
§epoch: u64
§worker_pid: Option<u32>
§boot_at: Timestamp

The renewal’s time on the boot clock (§12h); 0 in records written before v4.5, which then read as long ago.

§

OpBegin

Written and fsynced before the backend call it names.

Fields

§op: OpId
§call: String
§

OpAck

Fields

§op: OpId
§outcome: Outcome
§

OverrideSet(Override)

§

OverrideLifted(UnitId)

§

Incident(Incident)

§

KnownGood(GenerationId)

§

LiveTested(Option<GenerationId>)

§

AcceptedBaseline(Option<GenerationId>)

§

SecurityFloor(Option<GenerationId>)

The security floor (§12e): derived when a generation commits, or set by an administrator’s mark-security-floor; never by a proposal.

§

ExternalAccepted

The external desired-state document accepted (§9 hook, §12c, B-16): its sequence number and the hash of its bytes. Replay protection lives here, in the journal and its checkpoint, not in a cache file.

Fields

§seq: u64
§digest: Hash
§

TokenUsed

An approval used (§12 step 4, I7): by whom, for which transaction.

Fields

§nonce: [u8; 16]
§expires: Timestamp
§approver: u64

The approver’s PrincipalId (a human’s is their uid); 0 in records from before v4.6.

§txn: u64
§

AgentStarted

planarian agent run <name> by this uid (§11, I24): the started unit’s instance (its InvocationID) acts with that user’s permissions, attributed to the agent. Journaled once the unit has started, so a failed or refused start binds nothing; covered by the chain.

Fields

§name: String
§instance: [u8; 16]

Zero in records written before v4.6, which then match no peer.

§by: u32
§

Resolved

Fields

§txn: TxnId
§resolution: Resolution
§

Reconciliation(Reconciliation)

§

HoldApplied

§12d Network security fails closed: the unit’s traffic is held, journaled before the call (write-ahead). A failure posture response, not a transaction (docs/bypasses.md).

Fields

§unit: UnitId
§

HoldLifted

The hold is lifted: the unit is Running and its Readiness probes pass, or an attested release. Journaled before the call.

Fields

§unit: UnitId
§reason: String

Trait Implementations§

Source§

impl Clone for Record

Source§

fn clone(&self) -> Record

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Record

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Record

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Record

Source§

fn eq(&self, other: &Record) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Record

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Record

Source§

impl StructuralPartialEq for Record

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,