pub struct AppendCondition {
pub fail_if_events_match: Query,
pub after: Position,
}Expand description
The guard on an append call.
The store ignores everything at or before after and rejects the
append if anything matching fail_if_events_match
landed since. after is the highest position the client observed while building
its decision model, which may be higher than the last matching event’s position.
Positions are 1-based, so after = Position::ZERO (the default)
means “consider the whole log”: the spec’s “omit after” case, i.e. fail if any
event matches (the uniqueness-guard pattern).
This type only holds the condition. Evaluating it (position filtering plus the match predicate over the durable suffix) is the engine’s job.
Fields§
§fail_if_events_match: QueryReject the append if any event after after matches this query.
after: PositionIgnore everything at or before this position. Position::ZERO means the whole
log.
Implementations§
Trait Implementations§
Source§impl Clone for AppendCondition
impl Clone for AppendCondition
Source§fn clone(&self) -> AppendCondition
fn clone(&self) -> AppendCondition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more