pub enum FenceDecision {
Proceed,
AlreadyCommitted {
committed_op_id: String,
},
StaleEpoch {
claimed_epoch: u64,
current_epoch: u64,
current_holder: Option<String>,
},
NotHeld {
claimed_epoch: u64,
},
}Expand description
The fence verdict for one dispatch attempt.
Variants§
Proceed
The oracle shows no prior commit AND the caller still holds the lease at the claimed epoch — the side effect may run. This is the ONLY verdict that authorizes an external write.
AlreadyCommitted
The durable idempotency oracle already holds a committed record for
(agent_id, run_id) — the run executed (here or on another site) and
must not run again. Fence-independent: returned whatever the epoch.
StaleEpoch
The caller is no longer the current holder at the claimed epoch — a stale zombie. Do not execute; re-acquire or stand by.
Fields
NotHeld
No lease is held for this agent at all (never acquired, or released). Not authorized to execute a leased side effect.
Implementations§
Source§impl FenceDecision
impl FenceDecision
Sourcepub fn may_dispatch(&self) -> bool
pub fn may_dispatch(&self) -> bool
Is this the one verdict that authorizes the external side effect?
Trait Implementations§
Source§impl Clone for FenceDecision
impl Clone for FenceDecision
Source§impl Debug for FenceDecision
impl Debug for FenceDecision
Source§impl<'de> Deserialize<'de> for FenceDecision
impl<'de> Deserialize<'de> for FenceDecision
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FenceDecision
Source§impl PartialEq for FenceDecision
impl PartialEq for FenceDecision
Source§impl Serialize for FenceDecision
impl Serialize for FenceDecision
impl StructuralPartialEq for FenceDecision
Auto Trait Implementations§
impl Freeze for FenceDecision
impl RefUnwindSafe for FenceDecision
impl Send for FenceDecision
impl Sync for FenceDecision
impl Unpin for FenceDecision
impl UnsafeUnpin for FenceDecision
impl UnwindSafe for FenceDecision
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
Mutably borrows from an owned value. Read more