pub enum WaitForTokenError {
Timeout,
WrongOrigin {
token_origin: u64,
adapter_origin: u64,
},
QueueFull,
FoldStopped {
applied_through_seq: Option<u64>,
},
}Expand description
Errors surfaced by CortexAdapter::wait_for_token and the
origin-bound adapters that wrap it.
Variants§
Timeout
Deadline elapsed before the fold watermark advanced to the token’s seq. The write may still land later; the caller can retry with a fresh deadline or accept the stale read.
WrongOrigin
Token belongs to a different origin than this adapter folds. Origin-bound adapters surface this to catch the caller-side aliasing where a token from chain A is waited on against an adapter bound to chain B — the wait would otherwise hang on a seq that can never land here.
Fields
QueueFull
Per-channel in-flight cap is saturated — back-pressure for
callers who can shed load instead of stacking unbounded
pending waits. See
super::config::CortexAdapterConfig::with_ryw_inflight_cap.
FoldStopped
Fold task stopped before the token’s seq was reached.
Under FoldErrorPolicy::Stop an unrecoverable fold error
halts the task, and any pending RYW wait observing
running == false surfaces this variant rather than a
silent Ok(()) — otherwise a producer cannot distinguish
“your write is visible” from “the adapter is dead and
never will reach your write.”
Trait Implementations§
Source§impl Debug for WaitForTokenError
impl Debug for WaitForTokenError
Source§impl Display for WaitForTokenError
impl Display for WaitForTokenError
Source§impl Error for WaitForTokenError
impl Error for WaitForTokenError
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()
Source§impl PartialEq for WaitForTokenError
impl PartialEq for WaitForTokenError
Source§fn eq(&self, other: &WaitForTokenError) -> bool
fn eq(&self, other: &WaitForTokenError) -> bool
self and other values to be equal, and is used by ==.impl Eq for WaitForTokenError
impl StructuralPartialEq for WaitForTokenError
Auto Trait Implementations§
impl Freeze for WaitForTokenError
impl RefUnwindSafe for WaitForTokenError
impl Send for WaitForTokenError
impl Sync for WaitForTokenError
impl Unpin for WaitForTokenError
impl UnsafeUnpin for WaitForTokenError
impl UnwindSafe for WaitForTokenError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.