pub struct AffectedRowGuard {
pub expected_min: u64,
pub expected_max: Option<u64>,
}Expand description
An affected-row guard (ADR-099 D1, rule 2): the row-count prepare assumed its target write would affect, re-verified in-transaction. A prepare-time validation is a plan hypothesis, never a commitment — if the guard does not hold at apply time, the op fails inside the atomic unit and the whole unit rolls back (ADR-099 acceptance criteria: “zero-row apply fails the unit”).
Fields§
§expected_min: u64Minimum affected-row count for the guard to hold (inclusive).
expected_max: Option<u64>Maximum affected-row count for the guard to hold (inclusive), or
None for “no upper bound” (e.g. a predicate-based rewire that may
touch any number of rows).
Implementations§
Source§impl AffectedRowGuard
impl AffectedRowGuard
Sourcepub fn exactly(n: u64) -> Self
pub fn exactly(n: u64) -> Self
A guard requiring exactly n affected rows (the common case for a
single-target update/delete/link statement).
Sourcepub fn at_least_one() -> Self
pub fn at_least_one() -> Self
A guard requiring at least one affected row and no upper bound (the
shape for a predicate-based rewire that may touch any number of rows,
e.g. merge’s edge rewire).
Trait Implementations§
Source§impl Clone for AffectedRowGuard
impl Clone for AffectedRowGuard
Source§fn clone(&self) -> AffectedRowGuard
fn clone(&self) -> AffectedRowGuard
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AffectedRowGuard
Source§impl Debug for AffectedRowGuard
impl Debug for AffectedRowGuard
impl Eq for AffectedRowGuard
Source§impl PartialEq for AffectedRowGuard
impl PartialEq for AffectedRowGuard
impl StructuralPartialEq for AffectedRowGuard
Auto Trait Implementations§
impl Freeze for AffectedRowGuard
impl RefUnwindSafe for AffectedRowGuard
impl Send for AffectedRowGuard
impl Sync for AffectedRowGuard
impl Unpin for AffectedRowGuard
impl UnsafeUnpin for AffectedRowGuard
impl UnwindSafe for AffectedRowGuard
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