pub struct OperatorRecordDraft { /* private fields */ }Expand description
The bounded audit row an adapter appends.
Implementations§
Source§impl OperatorRecordDraft
impl OperatorRecordDraft
Sourcepub fn applied(
request: &OperatorRequest,
job_instance_id: Option<JobInstanceId>,
job_execution_id: Option<JobExecutionId>,
prior_status: Option<BatchStatus>,
result_status: Option<BatchStatus>,
requested_at: SystemTime,
) -> Self
pub fn applied( request: &OperatorRequest, job_instance_id: Option<JobInstanceId>, job_execution_id: Option<JobExecutionId>, prior_status: Option<BatchStatus>, result_status: Option<BatchStatus>, requested_at: SystemTime, ) -> Self
Drafts the audit row for one applied request.
The audited action, actor, reason, and digest are taken from the request, so the row cannot disagree with the request it audits. The four effect values are what the transaction observed and produced.
Sourcepub fn rejected(
request: &OperatorRequest,
rejection: OperatorRejection,
requested_at: SystemTime,
) -> Self
pub fn rejected( request: &OperatorRequest, rejection: OperatorRejection, requested_at: SystemTime, ) -> Self
Drafts the audit row for one rejected request.
A rejection applies no effect, so the row carries only the target the request already named and no observed or produced status.
Sourcepub const fn from_durable(
action: OperatorAction,
operation_id: OperationId,
actor: ActorRef,
reason: Option<ReasonCode>,
digest: RequestDigest,
job_instance_id: Option<JobInstanceId>,
job_execution_id: Option<JobExecutionId>,
observed_version: Option<ExecutionVersion>,
prior_status: Option<BatchStatus>,
result_status: Option<BatchStatus>,
outcome: OperatorOutcomeClass,
rejection: Option<OperatorRejection>,
requested_at: SystemTime,
) -> Self
pub const fn from_durable( action: OperatorAction, operation_id: OperationId, actor: ActorRef, reason: Option<ReasonCode>, digest: RequestDigest, job_instance_id: Option<JobInstanceId>, job_execution_id: Option<JobExecutionId>, observed_version: Option<ExecutionVersion>, prior_status: Option<BatchStatus>, result_status: Option<BatchStatus>, outcome: OperatorOutcomeClass, rejection: Option<OperatorRejection>, requested_at: SystemTime, ) -> Self
Rebuilds a draft from one durable audit row.
Durable adapters use this to return a recorded outcome without re-deriving it from a request that may no longer exist.
Sourcepub const fn action(&self) -> OperatorAction
pub const fn action(&self) -> OperatorAction
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) -> Option<&ReasonCode>
pub const fn reason(&self) -> Option<&ReasonCode>
Borrows the closed-set reason code, when present.
Sourcepub const fn digest(&self) -> &RequestDigest
pub const fn digest(&self) -> &RequestDigest
Returns the canonical request digest.
Sourcepub const fn job_instance_id(&self) -> Option<JobInstanceId>
pub const fn job_instance_id(&self) -> Option<JobInstanceId>
Returns the audited logical instance, when known.
Sourcepub const fn job_execution_id(&self) -> Option<JobExecutionId>
pub const fn job_execution_id(&self) -> Option<JobExecutionId>
Returns the audited execution, when known.
Sourcepub const fn observed_version(&self) -> Option<ExecutionVersion>
pub const fn observed_version(&self) -> Option<ExecutionVersion>
Returns the version observed under lock.
Sourcepub const fn prior_status(&self) -> Option<BatchStatus>
pub const fn prior_status(&self) -> Option<BatchStatus>
Returns the status observed before the effect.
Sourcepub const fn result_status(&self) -> Option<BatchStatus>
pub const fn result_status(&self) -> Option<BatchStatus>
Returns the status the effect produced.
Sourcepub const fn outcome(&self) -> OperatorOutcomeClass
pub const fn outcome(&self) -> OperatorOutcomeClass
Returns the recorded outcome class.
Sourcepub const fn rejection(&self) -> Option<OperatorRejection>
pub const fn rejection(&self) -> Option<OperatorRejection>
Returns the recorded rejection class, when the action was rejected.
Sourcepub const fn requested_at(&self) -> SystemTime
pub const fn requested_at(&self) -> SystemTime
Returns the facade-clock instant recorded with the request.
Trait Implementations§
Source§impl Clone for OperatorRecordDraft
impl Clone for OperatorRecordDraft
Source§fn clone(&self) -> OperatorRecordDraft
fn clone(&self) -> OperatorRecordDraft
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more