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,
) -> OperatorRecordDraft
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, ) -> OperatorRecordDraft
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,
) -> OperatorRecordDraft
pub fn rejected( request: &OperatorRequest, rejection: OperatorRejection, requested_at: SystemTime, ) -> OperatorRecordDraft
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,
) -> OperatorRecordDraft
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, ) -> OperatorRecordDraft
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 moreSource§impl Debug for OperatorRecordDraft
impl Debug for OperatorRecordDraft
impl Eq for OperatorRecordDraft
Source§impl PartialEq for OperatorRecordDraft
impl PartialEq for OperatorRecordDraft
impl StructuralPartialEq for OperatorRecordDraft
Auto Trait Implementations§
impl Freeze for OperatorRecordDraft
impl RefUnwindSafe for OperatorRecordDraft
impl Send for OperatorRecordDraft
impl Sync for OperatorRecordDraft
impl Unpin for OperatorRecordDraft
impl UnsafeUnpin for OperatorRecordDraft
impl UnwindSafe for OperatorRecordDraft
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