pub enum Disposition {
DidNotHappen,
InDoubt,
Landed,
}Expand description
What a failure says about whether the call reached the outside world.
This is the distinction retry safety rests on, and it is not the same question as “was the error transient”. A refused connection and a timed-out request are both transient; only one of them is safe to repeat against a ledger.
The vocabulary is borrowed from distributed transactions, where a participant whose outcome is unknown after a failure has been called in-doubt since the XA specification. The situation is identical: the journal cannot distinguish “never applied” from “applied, and the acknowledgement was lost”, and no amount of retrying makes it decidable.
Variants§
DidNotHappen
The call provably never took effect — refused before dispatch, or rejected by the peer with the request intact. Safe to repeat, even for something that mutates.
InDoubt
The outcome is unknown. The request may or may not have been applied, and nothing observable distinguishes the two.
Identical in kind to the orphan a crash leaves behind, so it is resolved
the same way: by the effect’s declared Recovery,
never by guessing.
Landed
It definitely took effect, and something went wrong afterwards — most often a response that would not decode.
Never retried. A repeat would be a second real performance, and the second one would fail to decode exactly like the first.
Implementations§
Source§impl Disposition
impl Disposition
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The variant name, for a metric label.
Deliberately not Display: a metric dimension must be bounded, and a
rendered message carries values. One label per distinct limit or detail
string is a cardinality explosion that takes a metrics backend down —
which is why every dimension in runtime::metrics comes from an accessor
like this one rather than from a formatted error.
Sourcepub fn is_definitely_safe_to_repeat(self) -> bool
pub fn is_definitely_safe_to_repeat(self) -> bool
Whether repeating the call is safe on its own terms, before the
effect’s Recovery gets a say.
Trait Implementations§
Source§impl Clone for Disposition
impl Clone for Disposition
impl Copy for Disposition
Source§impl Debug for Disposition
impl Debug for Disposition
Source§impl<'de> Deserialize<'de> for Disposition
impl<'de> Deserialize<'de> for Disposition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Disposition
Source§impl PartialEq for Disposition
impl PartialEq for Disposition
Source§impl Serialize for Disposition
impl Serialize for Disposition
impl StructuralPartialEq for Disposition
Auto Trait Implementations§
impl Freeze for Disposition
impl RefUnwindSafe for Disposition
impl Send for Disposition
impl Sync for Disposition
impl Unpin for Disposition
impl UnsafeUnpin for Disposition
impl UnwindSafe for Disposition
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.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