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,
) -> RetentionRecordDraft
pub fn instance_action( action: RetentionAction, operation_id: OperationId, actor: ActorRef, reason: ReasonCode, job_instance_id: JobInstanceId, applied_at: SystemTime, ) -> RetentionRecordDraft
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,
) -> RetentionRecordDraft
pub const fn purge( operation_id: OperationId, actor: ActorRef, reason: ReasonCode, plan_digest: [u8; 32], counts: PurgeCounts, batch_bound: PurgeBatchBound, applied_at: SystemTime, ) -> RetentionRecordDraft
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,
) -> RetentionRecordDraft
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, ) -> RetentionRecordDraft
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 moreSource§impl Debug for RetentionRecordDraft
impl Debug for RetentionRecordDraft
impl Eq for RetentionRecordDraft
Source§impl PartialEq for RetentionRecordDraft
impl PartialEq for RetentionRecordDraft
impl StructuralPartialEq for RetentionRecordDraft
Auto Trait Implementations§
impl Freeze for RetentionRecordDraft
impl RefUnwindSafe for RetentionRecordDraft
impl Send for RetentionRecordDraft
impl Sync for RetentionRecordDraft
impl Unpin for RetentionRecordDraft
impl UnsafeUnpin for RetentionRecordDraft
impl UnwindSafe for RetentionRecordDraft
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more