pub struct NodeAttemptCompletion { /* private fields */ }Expand description
Immutable terminal record for one already-started physical node attempt.
Implementations§
Source§impl NodeAttemptCompletion
impl NodeAttemptCompletion
Sourcepub fn succeed(
start: &NodeAttemptStart,
result: PendingNodeResultHead,
usage: BudgetUsage,
) -> Result<Self, NodeAttemptError>
pub fn succeed( start: &NodeAttemptStart, result: PendingNodeResultHead, usage: BudgetUsage, ) -> Result<Self, NodeAttemptError>
Commits success against the exact pending result produced by the start.
The completion and pending result deliberately share one journal head; the storage adapter must insert both in the same transaction.
§Errors
Returns NodeAttemptError for substituted activation, fence, journal,
or integrity material.
Sourcepub fn fail(
start: &NodeAttemptStart,
failure: Failure,
usage: BudgetUsage,
journal_head: JournalHead,
) -> Result<Self, NodeAttemptError>
pub fn fail( start: &NodeAttemptStart, failure: Failure, usage: BudgetUsage, journal_head: JournalHead, ) -> Result<Self, NodeAttemptError>
Commits a failed attempt with explicit public recovery evidence.
The failure must name journal_head.event_id() as its durable cause.
Reconcile-first failures are rejected because node code may perform
external effects only through the separate invocation ledgers.
§Errors
Returns NodeAttemptError for invalid causation, retry semantics,
scope, ordering, or integrity material.
Sourcepub fn restore(
start: NodeAttemptStartHead,
outcome: NodeAttemptOutcome,
usage: BudgetUsage,
journal_head: JournalHead,
digest: Digest,
) -> Result<Self, NodeAttemptError>
pub fn restore( start: NodeAttemptStartHead, outcome: NodeAttemptOutcome, usage: BudgetUsage, journal_head: JournalHead, digest: Digest, ) -> Result<Self, NodeAttemptError>
Restores and verifies a durable terminal record.
§Errors
Returns NodeAttemptError when any local invariant or checksum fails.
Sourcepub const fn start(&self) -> &NodeAttemptStartHead
pub const fn start(&self) -> &NodeAttemptStartHead
Returns the exact start completed by this record.
Sourcepub const fn outcome(&self) -> &NodeAttemptOutcome
pub const fn outcome(&self) -> &NodeAttemptOutcome
Returns the terminal outcome.
Sourcepub const fn status(&self) -> NodeAttemptStatus
pub const fn status(&self) -> NodeAttemptStatus
Returns the terminal status.
Sourcepub const fn usage(&self) -> &BudgetUsage
pub const fn usage(&self) -> &BudgetUsage
Returns the exact usage attributed to this physical attempt.
Sourcepub const fn journal_head(&self) -> &JournalHead
pub const fn journal_head(&self) -> &JournalHead
Returns the exact terminal journal anchor.
Trait Implementations§
Source§impl Clone for NodeAttemptCompletion
impl Clone for NodeAttemptCompletion
Source§impl Debug for NodeAttemptCompletion
impl Debug for NodeAttemptCompletion
Source§impl<'de> Deserialize<'de> for NodeAttemptCompletion
impl<'de> Deserialize<'de> for NodeAttemptCompletion
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>,
Source§impl JsonSchema for NodeAttemptCompletion
impl JsonSchema for NodeAttemptCompletion
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 more