pub struct ConcurrencyGuard {
pub report: ConcurrencyReport,
pub gate: ConcurrencyGate,
pub abort: bool,
pub rejected_ops: HashSet<String>,
}Expand description
The commit-barrier decision derived from a gated ConcurrencyReport.
Fields§
§report: ConcurrencyReportThe raw detector report (level + every anomaly found).
gate: ConcurrencyGateThe gate’s per-anomaly remediations and dispositions.
abort: boolTrue when the whole batch must abort (any Abort disposition). No op is
committed when set.
rejected_ops: HashSet<String>Op ids whose individual commit must be rejected (fail-closed
RequireApproval, no approval sink). Their writes are not merged.
Implementations§
Source§impl ConcurrencyGuard
impl ConcurrencyGuard
Sourcepub fn may_commit(&self, op_id: &str) -> bool
pub fn may_commit(&self, op_id: &str) -> bool
Should the op with this id have its writes committed? False when the whole batch aborts or this specific op was rejected for approval.
Sourcepub fn rejection_reason(&self, op_id: &str) -> Option<String>
pub fn rejection_reason(&self, op_id: &str) -> Option<String>
A human-readable reason a specific op was held back, for the errored output surfaced to the caller.
Sourcepub fn anomaly_summary(&self) -> String
pub fn anomaly_summary(&self) -> String
One-line summary of the anomalies found, for logs and errors.
Trait Implementations§
Source§impl Clone for ConcurrencyGuard
impl Clone for ConcurrencyGuard
Auto Trait Implementations§
impl Freeze for ConcurrencyGuard
impl RefUnwindSafe for ConcurrencyGuard
impl Send for ConcurrencyGuard
impl Sync for ConcurrencyGuard
impl Unpin for ConcurrencyGuard
impl UnsafeUnpin for ConcurrencyGuard
impl UnwindSafe for ConcurrencyGuard
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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