pub struct AttemptId(pub String);Expand description
Identifier of one attempt at an external effect, scoped to the outbox or the dispatcher, used to reconcile an unknown outcome (I15).
§Why this is an identifier and a model call attempt is a number
ProviderAttemptRecord::attempt
counts model calls with a plain u32, and that asymmetry is deliberate.
A model call has no effect outside the process: if it times out, the only thing anyone ever needs to say about it is which try it was, within a stage whose identity the replay record already fixes (the turn, the purpose, the provider and the model). Nothing outside the record refers to it, so it needs a position, not a name.
An external effect attempt is the opposite. It may have happened even
though the answer never arrived (spec §16.5), which is what
OutcomeUnknown means, and settling it later requires naming the exact
attempt to a remote system that has its own idea of what it received.
That name is passed to the dispatcher as an idempotency-scoped token,
stored on the outbox row, quoted in a reconciliation query and compared
against a remote reference. An ordinal would be ambiguous the moment two
workers, two rows or two turns counted separately; an identifier is not.
Tuple Fields§
§0: StringImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AttemptId
impl<'de> Deserialize<'de> for AttemptId
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 AttemptId
Source§impl JsonSchema for AttemptId
impl JsonSchema for AttemptId
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for AttemptId
impl Ord for AttemptId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for AttemptId
impl PartialOrd for AttemptId
impl StructuralPartialEq for AttemptId
Auto Trait Implementations§
impl Freeze for AttemptId
impl RefUnwindSafe for AttemptId
impl Send for AttemptId
impl Sync for AttemptId
impl Unpin for AttemptId
impl UnsafeUnpin for AttemptId
impl UnwindSafe for AttemptId
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.