Enum NeonPeerError
#[non_exhaustive]pub enum NeonPeerError<E> {
Read(NeonError<E>),
Ingest(IngestError<NeonError<E>>),
Answer(NeonError<E>),
#[non_exhaustive] EventTooLarge {
id: EventId,
len: usize,
limit: usize,
},
#[non_exhaustive] TooManyEvents {
actual: usize,
limit: usize,
},
#[non_exhaustive] BatchTooLarge {
actual: usize,
limit: usize,
},
}event-store and sync only.Expand description
How a NeonSyncPeer fails: the store’s error, the ingest’s refusal, or
a push over the limits it declared.
Its own type rather than happenstance-sync’s StorePeerError, whose
limit variants are #[non_exhaustive] and so cannot be built outside that
crate. The arms mirror it, and so do their classes (SY-36). E is the
transport’s error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Read(NeonError<E>)
The pull’s one request, the group read and the identity read together,
failed, or its answer could not be read: the page, waiting or the
responder. One arm for both reads, where StorePeerError has Read
and Identity, because here they are one request and fail together.
Nothing was forwarded.
Ingest(IngestError<NeonError<E>>)
The push’s request was refused or failed. Nothing in the push was
written, save the unknown outcome IngestError::Store describes for
a request that got no answer.
Answer(NeonError<E>)
The push’s request committed and the watermark or the identity in its answer could not be read. Re-delivering the push converges: every event in it is now a skip.
#[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
Trait Implementations§
§impl<E> Classify for NeonPeerError<E>
The store’s arms ask the store’s error; the limit arms are fixed by the arm
(SY-36).
impl<E> Classify for NeonPeerError<E>
The store’s arms ask the store’s error; the limit arms are fixed by the arm (SY-36).
§fn class(&self) -> FailureClass
fn class(&self) -> FailureClass
§impl<E: Debug> Debug for NeonPeerError<E>
impl<E: Debug> Debug for NeonPeerError<E>
§impl<E> Display for NeonPeerError<E>
impl<E> Display for NeonPeerError<E>
§impl<E> Error for NeonPeerError<E>
impl<E> Error for NeonPeerError<E>
§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()