pub struct ClaimGrant {
pub execution_id: ExecutionId,
pub partition_key: PartitionKey,
pub grant_key: String,
pub expires_at_ms: u64,
}Expand description
A claim grant issued by the scheduler for a specific execution.
Re-exported from ff_core::contracts::ClaimGrant. Lives in
ff-core so ff-scheduler (issuer) and ff-sdk (consumer)
share one wire-level type without a cross-dep between them.
A claim grant issued by the scheduler for a specific execution.
The worker uses this to call ff_claim_execution (or
ff_acquire_lease), which atomically consumes the grant and
creates the lease.
Shared wire-level type between ff-scheduler (issuer) and
ff-sdk (consumer, via FlowFabricWorker::claim_from_grant).
Lives in ff-core so neither crate needs a dep on the other.
Lane asymmetry with ReclaimGrant: ClaimGrant does NOT
carry lane_id. The issuing scheduler’s caller already picked
a lane (that’s how admission reached this grant) and passes it
through to claim_from_grant as a separate argument. The grant
handle stays narrow to what uniquely identifies the admission
decision. The matching field on ReclaimGrant is an
intentional divergence — see the note on that type.
Fields§
§execution_id: ExecutionIdThe execution that was granted.
partition_key: PartitionKeyOpaque partition handle for this execution’s hash-tag slot.
Public wire type: consumers pass it back to FlowFabric but
must not parse the interior hash tag for routing decisions.
Internal consumers that need the typed
crate::partition::Partition call Self::partition.
grant_key: StringThe Valkey key holding the grant hash (for the worker to reference).
expires_at_ms: u64When the grant expires if not consumed.
Implementations§
Source§impl ClaimGrant
impl ClaimGrant
Sourcepub fn partition(&self) -> Result<Partition, PartitionKeyParseError>
pub fn partition(&self) -> Result<Partition, PartitionKeyParseError>
Parse partition_key into a typed
crate::partition::Partition. Intended for internal
consumers (scheduler emitter, SDK worker claim path) that
need the family/index pair. Fails only on malformed keys
(which indicates a producer bug).
Alias collapse applies: a grant issued against Execution
family round-trips to Flow (see crate::partition::PartitionKey
for the rationale — routing is preserved, only the metadata
family label normalises).
Trait Implementations§
Source§impl Clone for ClaimGrant
impl Clone for ClaimGrant
Source§fn clone(&self) -> ClaimGrant
fn clone(&self) -> ClaimGrant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClaimGrant
impl Debug for ClaimGrant
Source§impl PartialEq for ClaimGrant
impl PartialEq for ClaimGrant
impl Eq for ClaimGrant
impl StructuralPartialEq for ClaimGrant
Auto Trait Implementations§
impl Freeze for ClaimGrant
impl RefUnwindSafe for ClaimGrant
impl Send for ClaimGrant
impl Sync for ClaimGrant
impl Unpin for ClaimGrant
impl UnsafeUnpin for ClaimGrant
impl UnwindSafe for ClaimGrant
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