Enum StorePeerError
#[non_exhaustive]pub enum StorePeerError<R, W, A = Infallible> {
Read(R),
Ingest(IngestError<W>),
Watermark(W),
Identity(W),
#[non_exhaustive] EventTooLarge {
id: EventId,
len: usize,
limit: usize,
},
#[non_exhaustive] TooManyEvents {
actual: usize,
limit: usize,
},
#[non_exhaustive] BatchTooLarge {
actual: usize,
limit: usize,
},
Adjudicate(A),
}Expand description
How a StoreSyncPeer fails: its store’s group-read error R, its ingest
error W, its merge rule’s error A, or a push over the limits it
declared.
The store’s errors are type parameters, never strings (RS-30-2), and each
states its own class (SY-36). No bounds on the enum, so it is Send exactly
when the store’s and the rule’s errors are (ADR-0009). A defaults to
Infallible, the error of Accept, so StorePeerError<R, W> still
names the error of a peer that judges nothing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Read(R)
The far store’s group read failed; the store’s error states the class.
Ingest(IngestError<W>)
The far store refused or failed the ingest. Nothing in the push was
written, save the unknown outcome IngestError::Store describes.
Watermark(W)
The ingest landed and the watermark to confirm it could not be read. Re-delivering the push converges: every event in it is now a skip.
Identity(W)
The far store’s identity, which every answer names (ADR-0104), could
not be read. After a push the ingest has landed, and re-delivering it
converges as for Watermark; after a pull nothing
was forwarded.
#[non_exhaustive]EventTooLarge
One event is larger than the declared
max_event_bytes, so no split can carry
it: Park.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]TooManyEvents
The push carries more events than the declared
max_batch_events:
Split.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]BatchTooLarge
The push carries more payload bytes than the declared
max_batch_bytes:
Split.
Fields
This variant is marked as non-exhaustive
Adjudicate(A)
The peer’s merge rule could not judge the push; nothing in it was written. The rule’s error states the class.
Trait Implementations§
§impl<R: Classify, W: Classify, A: Classify> Classify for StorePeerError<R, W, A>
The store’s arms ask the store’s error, the rule’s arm the rule’s; the
limit arms are fixed by the arm (SY-36).
impl<R: Classify, W: Classify, A: Classify> Classify for StorePeerError<R, W, A>
The store’s arms ask the store’s error, the rule’s arm the rule’s; the limit arms are fixed by the arm (SY-36).
§fn class(&self) -> FailureClass
fn class(&self) -> FailureClass
§impl<R, W, A> Display for StorePeerError<R, W, A>where
IngestError<W>: Display,
impl<R, W, A> Display for StorePeerError<R, W, A>where
IngestError<W>: Display,
§impl<R, W, A> Error for StorePeerError<R, W, A>
impl<R, W, A> Error for StorePeerError<R, W, A>
§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()