#[non_exhaustive]pub enum ProjectionError {
CursorCodec(String),
ProviderManifestMismatch {
expected: String,
actual: String,
},
InvalidConfig {
setting: &'static str,
reason: String,
},
AlreadyRunning {
projection_id: ProjectionId,
},
Fenced {
projection_id: ProjectionId,
attempted_generation: u64,
current_generation: u64,
},
UnexpectedPosition {
projection_id: ProjectionId,
expected: Option<String>,
actual: Option<String>,
},
GenerationExhausted {
projection_id: ProjectionId,
},
Source(String),
Handler(String),
OffsetStore(String),
Runtime(String),
TestKitTimeout {
timeout_ms: u64,
},
}Expand description
Projection infrastructure failures.
Fatal errors are deterministic configuration, durable-data, or ownership
violations. They bypass restart backoff. Restartable errors are transient
source and offset-store failures. ProjectionError::Handler records an
error returned by a handler or handler factory, but handler-invocation
errors first follow super::RecoveryStrategy; only an exhausted
invocation escalates to projection restart. The D9 fatal/restartable split
governs infrastructure errors directly.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CursorCodec(String)
A durable cursor could not be decoded or was not canonically encoded.
ProviderManifestMismatch
A cursor belongs to a different source-provider identity.
Fields
InvalidConfig
Projection configuration is deterministically invalid.
Fields
AlreadyRunning
A second in-process owner attempted to spawn the same projection id.
Fields
projection_id: ProjectionIdProjection identity already reserved by a live actor.
Fenced
An offset-store write used an owner generation superseded by a claimant.
Fields
projection_id: ProjectionIdProjection whose store ownership was lost.
UnexpectedPosition
A compare-and-set save observed a different cursor position.
Fields
projection_id: ProjectionIdProjection whose cursor changed unexpectedly.
GenerationExhausted
A projection generation reached its durable numeric limit.
Fields
projection_id: ProjectionIdProjection whose generation cannot advance.
Source(String)
A projection source failed while being created or consumed.
Handler(String)
A handler invocation or handler factory failed.
Runtime code routes this through RecoveryStrategy before considering
projection restart, regardless of this variant’s infrastructure kind.
OffsetStore(String)
Offset-store I/O failed or its result is uncertain.
Runtime(String)
The Ractor shell or its bounded execution bridge failed.
TestKitTimeout
A projection-testkit assertion did not pass within its bounded window.
Implementations§
Source§impl ProjectionError
impl ProjectionError
Sourcepub const fn kind(&self) -> ProjectionErrorKind
pub const fn kind(&self) -> ProjectionErrorKind
Returns the D9 fatal-versus-restartable classification.
Sourcepub const fn is_fatal(&self) -> bool
pub const fn is_fatal(&self) -> bool
Returns whether this error must stop without entering restart backoff.
Sourcepub const fn is_restartable(&self) -> bool
pub const fn is_restartable(&self) -> bool
Returns whether this error may restart the projection under backoff.
Trait Implementations§
Source§impl Clone for ProjectionError
impl Clone for ProjectionError
Source§impl Debug for ProjectionError
impl Debug for ProjectionError
Source§impl Display for ProjectionError
impl Display for ProjectionError
impl Eq for ProjectionError
Source§impl Error for ProjectionError
impl Error for ProjectionError
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()