#[non_exhaustive]pub enum ResetError<E> {
ForeignBatch,
Refused,
Store(E),
}Expand description
Why a reset failed.
Separate from CommitError so a caller matching commit’s result never
has to consider Refused, which commit cannot produce.
One merged ProjectionError<E> was the alternative and it lost:
#[non_exhaustive] already forces a wildcard arm without also forcing dead
ones.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ForeignBatch
The batch was begun on a different store instance.
See CommitError::ForeignBatch for why this is a run-time rejection.
Refused
This store declines to reset this projection.
The variant is bare on purpose. The port supplies the mechanism and the
domain decides what to protect, so a &'static str here would push a
domain sentence through a port type that cannot validate it, cannot
localise it and cannot keep it in step with the policy that produced it.
An operator learns that the reset was declined from this variant, and
which policy declined it from the store that holds the policy. A
refusal is not success: it leaves the rows and the checkpoint unchanged.
Store(E)
The adapter failed for its own reasons.
Trait Implementations§
Source§impl<E: Clone> Clone for ResetError<E>
impl<E: Clone> Clone for ResetError<E>
Source§impl<E: Debug> Debug for ResetError<E>
impl<E: Debug> Debug for ResetError<E>
Source§impl<E> Display for ResetError<E>where
E: Display,
impl<E> Display for ResetError<E>where
E: Display,
impl<E: Eq> Eq for ResetError<E>
Source§impl<E> Error for ResetError<E>
impl<E> Error for ResetError<E>
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()