#[non_exhaustive]pub struct ReclaimGrant {
pub execution_id: ExecutionId,
pub partition_key: PartitionKey,
pub grant_key: String,
pub expires_at_ms: u64,
pub lane_id: LaneId,
}Expand description
A lease-reclaim grant issued for an execution in
lease_expired_reclaimable or lease_revoked state (RFC-024 §3.1).
Distinct from ResumeGrant: the reclaim grant routes to
ff_reclaim_execution (Valkey) / the new-attempt reclaim impl
(PG/SQLite), which creates a NEW attempt row and bumps the
execution’s lease_reclaim_count. The resume grant, by contrast,
re-uses the existing attempt under ff_claim_resumed_execution.
Carries lane_id for symmetry with ResumeGrant — the Lua
ff_reclaim_execution needs the lane for key construction, and
the consuming worker would otherwise pay a round-trip to recover
it from exec_core.
Backend impl bodies ship under PR-D (PG) / PR-E (SQLite) / PR-F
(Valkey). This PR lands only the type + trait surface; default
crate::engine_backend::EngineBackend::issue_reclaim_grant and
crate::engine_backend::EngineBackend::reclaim_execution return
crate::engine_error::EngineError::Unavailable until each
backend PR wires its real body.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.execution_id: ExecutionIdThe execution granted for lease-reclaim.
partition_key: PartitionKeyOpaque partition handle for this execution’s hash-tag slot.
grant_key: StringBackend-scoped grant key (Valkey key / PG+SQLite
ff_claim_grant.grant_id).
expires_at_ms: u64Monotonic ms when the grant expires; unconsumed grants vanish.
lane_id: LaneIdLane the execution belongs to — needed by
ff_reclaim_execution for KEYS[*] construction.
Implementations§
Source§impl ReclaimGrant
impl ReclaimGrant
Sourcepub fn new(
execution_id: ExecutionId,
partition_key: PartitionKey,
grant_key: String,
expires_at_ms: u64,
lane_id: LaneId,
) -> ReclaimGrant
pub fn new( execution_id: ExecutionId, partition_key: PartitionKey, grant_key: String, expires_at_ms: u64, lane_id: LaneId, ) -> ReclaimGrant
Construct a reclaim grant. Added alongside #[non_exhaustive]
per RFC-024 §3.1 + feedback_non_exhaustive_needs_constructor.
Sourcepub fn partition(&self) -> Result<Partition, PartitionKeyParseError>
pub fn partition(&self) -> Result<Partition, PartitionKeyParseError>
Parse partition_key into a typed
crate::partition::Partition.
Trait Implementations§
Source§impl Clone for ReclaimGrant
impl Clone for ReclaimGrant
Source§fn clone(&self) -> ReclaimGrant
fn clone(&self) -> ReclaimGrant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReclaimGrant
impl Debug for ReclaimGrant
Source§impl PartialEq for ReclaimGrant
impl PartialEq for ReclaimGrant
impl Eq for ReclaimGrant
impl StructuralPartialEq for ReclaimGrant
Auto Trait Implementations§
impl Freeze for ReclaimGrant
impl RefUnwindSafe for ReclaimGrant
impl Send for ReclaimGrant
impl Sync for ReclaimGrant
impl Unpin for ReclaimGrant
impl UnsafeUnpin for ReclaimGrant
impl UnwindSafe for ReclaimGrant
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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