pub struct RetentionRecordDraft { /* private fields */ }Expand description
The bounded retention audit row an adapter appends.
Implementations§
Source§impl RetentionRecordDraft
impl RetentionRecordDraft
Sourcepub fn instance_action(
action: RetentionAction,
operation_id: OperationId,
actor: ActorRef,
reason: ReasonCode,
job_instance_id: JobInstanceId,
applied_at: SystemTime,
) -> Self
pub fn instance_action( action: RetentionAction, operation_id: OperationId, actor: ActorRef, reason: ReasonCode, job_instance_id: JobInstanceId, applied_at: SystemTime, ) -> Self
Drafts the audit row for one applied instance-scoped action.
A hold or hold release names an instance and deletes nothing, so the row carries no plan digest, no batch bound, and default counts.
Sourcepub const fn purge(
operation_id: OperationId,
actor: ActorRef,
reason: ReasonCode,
plan_digest: [u8; 32],
counts: PurgeCounts,
batch_bound: PurgeBatchBound,
applied_at: SystemTime,
) -> Self
pub const fn purge( operation_id: OperationId, actor: ActorRef, reason: ReasonCode, plan_digest: [u8; 32], counts: PurgeCounts, batch_bound: PurgeBatchBound, applied_at: SystemTime, ) -> Self
Drafts the audit row for one applied purge batch.
The row is bound to the plan digest the batch was applied under and to the bound that limited it, so a replay can tell which plan produced the recorded counts.
Sourcepub const fn from_durable(
action: RetentionAction,
operation_id: OperationId,
actor: ActorRef,
reason: ReasonCode,
job_instance_id: Option<JobInstanceId>,
plan_digest: Option<[u8; 32]>,
counts: PurgeCounts,
batch_bound: Option<PurgeBatchBound>,
outcome: RetentionOutcome,
applied_at: SystemTime,
) -> Self
pub const fn from_durable( action: RetentionAction, operation_id: OperationId, actor: ActorRef, reason: ReasonCode, job_instance_id: Option<JobInstanceId>, plan_digest: Option<[u8; 32]>, counts: PurgeCounts, batch_bound: Option<PurgeBatchBound>, outcome: RetentionOutcome, applied_at: SystemTime, ) -> Self
Rebuilds a draft from one durable audit row.
Sourcepub const fn action(&self) -> RetentionAction
pub const fn action(&self) -> RetentionAction
Returns the audited action.
Sourcepub const fn operation_id(&self) -> &OperationId
pub const fn operation_id(&self) -> &OperationId
Borrows the idempotency key.
Sourcepub const fn reason(&self) -> &ReasonCode
pub const fn reason(&self) -> &ReasonCode
Borrows the closed-set reason code.
Sourcepub const fn job_instance_id(&self) -> Option<JobInstanceId>
pub const fn job_instance_id(&self) -> Option<JobInstanceId>
Returns the held instance, when the action targets one.
Sourcepub const fn plan_digest(&self) -> Option<&[u8; 32]>
pub const fn plan_digest(&self) -> Option<&[u8; 32]>
Returns the applied plan digest, when the action is a purge.
Sourcepub const fn counts(&self) -> PurgeCounts
pub const fn counts(&self) -> PurgeCounts
Returns the per-table deleted counts.
Sourcepub const fn batch_bound(&self) -> Option<PurgeBatchBound>
pub const fn batch_bound(&self) -> Option<PurgeBatchBound>
Returns the batch bound, when the action is a purge.
Sourcepub const fn outcome(&self) -> RetentionOutcome
pub const fn outcome(&self) -> RetentionOutcome
Returns the recorded outcome class.
Sourcepub const fn applied_at(&self) -> SystemTime
pub const fn applied_at(&self) -> SystemTime
Returns the facade-clock instant of the audited action.
Trait Implementations§
Source§impl Clone for RetentionRecordDraft
impl Clone for RetentionRecordDraft
Source§fn clone(&self) -> RetentionRecordDraft
fn clone(&self) -> RetentionRecordDraft
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more