pub enum SubscriptionError {
Sqlx(Error),
LaneMismatch(String),
Job(JobError),
StateDecode(Error),
NoSuchJob {
subscriber_type: String,
key: String,
},
CaughtUpTimeout {
checkpoint: StreamPosition,
target: StreamPosition,
waited: Duration,
},
}Expand description
Failure modes of the checkpoint read-back and the caught-up barrier.
Variants§
Sqlx(Error)
Reading the stream frontier failed.
LaneMismatch(String)
The stored checkpoint is on the other Lane from the one this handle
is typed for; the two cursors count different things.
Job(JobError)
Reading the handler job failed — a snapshot load (including the job never having existed), or a checkpoint point-read whose stored state did not decode.
StateDecode(Error)
The committed execution state did not decode as the handler job’s state type — the checkpoint is unreadable rather than absent.
NoSuchJob
A keyed member’s job could not be resolved from
(subscriber_type, key) — no job of that type has ever been spawned
under the key. Distinct from a cancelled subscription, whose job rows
outlive the subscriptions row.
CaughtUpTimeout
Subscription::await_position — or
await_caught_up, which
delegates to it — hit its deadline. Carries the observed lag so the
caller can alert with real numbers instead of reporting a bare
timeout.
target is the position being awaited: the caller’s own for
await_position, the call-time frontier for await_caught_up. It names
its lane, so on the commit lane it says which half of the fence ran out.
Trait Implementations§
Source§impl Debug for SubscriptionError
impl Debug for SubscriptionError
Source§impl Display for SubscriptionError
impl Display for SubscriptionError
Source§impl Error for SubscriptionError
impl Error for SubscriptionError
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 From<Error> for SubscriptionError
impl From<Error> for SubscriptionError
Source§impl From<Error> for SubscriptionError
impl From<Error> for SubscriptionError
Auto Trait Implementations§
impl !RefUnwindSafe for SubscriptionError
impl !UnwindSafe for SubscriptionError
impl Freeze for SubscriptionError
impl Send for SubscriptionError
impl Sync for SubscriptionError
impl Unpin for SubscriptionError
impl UnsafeUnpin for SubscriptionError
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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