Skip to main content

made_core/value_objects/delivery/
owed.rs

1use serde::{Deserialize, Serialize};
2
3/// Whether the binding was holding work when it asked.
4///
5/// A loop with an empty queue that asks and is told nothing is
6/// waiting, which is what a loop does while an agent works a long step
7/// or a person thinks. A loop holding work it was handed and told
8/// nothing is the one that is going round without moving. The spec's
9/// "rounds without progress" is the second, and only the second.
10#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
11#[serde(rename_all = "snake_case")]
12pub enum Owed {
13    /// Nothing outstanding: every delivery reached an end.
14    Nothing,
15    /// At least one delivery offered, handed over or acknowledged and
16    /// not yet closed.
17    Something,
18}