pub enum ValidationError {
RunIdMismatch {
expected: RunId,
found: RunId,
},
NonContiguousSeq {
expected: SequenceNumber,
found: SequenceNumber,
},
BadSchemaVersion {
version: u32,
max: u32,
},
ExpectedRunStarted {
found: &'static str,
},
DuplicateRunStarted,
AfterTerminal {
terminal: &'static str,
},
ExpectedCompletion {
intent_seq: SequenceNumber,
found: &'static str,
},
MiscorrelatedCompletion {
expected: SequenceNumber,
found: SequenceNumber,
},
UncorrelatedCompletion {
found: &'static str,
},
IntentSeqMismatch {
envelope_seq: SequenceNumber,
inner_seq: SequenceNumber,
},
}Expand description
Why a candidate envelope is not the legal next event for a log.
One variant per illegal class, each naming the position or values that made
the decision, so the server can turn it into a precise 409 body.
Variants§
RunIdMismatch
The candidate names a different run than the log it would join.
NonContiguousSeq
The candidate’s sequence number is not the next contiguous position.
Fields
expected: SequenceNumberThe only position an append may occupy: one past the log’s end.
found: SequenceNumberThe position the candidate claimed.
BadSchemaVersion
The candidate’s schema version is outside the range this build writes.
Fields
max: u32The highest version this build understands (SCHEMA_VERSION).
ExpectedRunStarted
A fresh log must open with RunStarted; this candidate did not.
DuplicateRunStarted
A run head (RunStarted or GraphRunStarted) may appear only as the
first event; the log already has one.
AfterTerminal
The log already ended with a terminal event; nothing may follow it.
ExpectedCompletion
A dangling intent must be followed by its correlated completion, and the candidate is not it (a second intent, a context event, or the wrong completion kind).
Fields
intent_seq: SequenceNumberThe position of the pending intent awaiting completion.
The candidate is a completion of the right kind, but its correlation sequence does not match the pending intent it would complete.
The candidate is a completion, but no intent is pending for it to correlate to.
IntentSeqMismatch
A fresh intent’s own correlation sequence must equal its envelope position, and this one’s does not.
Fields
envelope_seq: SequenceNumberThe position the envelope occupies.
inner_seq: SequenceNumberThe correlation sequence the payload carried.
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
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 ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
impl Eq for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ValidationError
impl PartialEq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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