Skip to main content

IssueClaimGrantArgs

Struct IssueClaimGrantArgs 

Source
#[non_exhaustive]
pub struct IssueClaimGrantArgs { pub execution_id: ExecutionId, pub lane_id: LaneId, pub worker_id: WorkerId, pub worker_instance_id: WorkerInstanceId, pub partition: Partition, pub capability_hash: Option<String>, pub route_snapshot_json: Option<String>, pub admission_summary: Option<String>, pub worker_capabilities: BTreeSet<String>, pub grant_ttl_ms: u64, pub now: TimestampMs, }
Expand description

Inputs to crate::engine_backend::EngineBackend::issue_claim_grant — the trait-level entry point v0.12 PR-5 lifted out of the SDK-side FlowFabricWorker::claim_next inline helper.

#[non_exhaustive] + ::new per feedback_non_exhaustive_needs_constructor: future fields may be added in minor releases; consumers MUST construct via Self::new and populate optional fields (capability_hash, route_snapshot_json, admission_summary) by direct field assignment on the returned value. Struct-literal construction is blocked by #[non_exhaustive]; ..Default::default() is not available for the same reason.

Carries the execution’s crate::partition::Partition so the Valkey backend can derive exec_core / claim_grant / the lane’s eligible_zset KEYS without a second round-trip.

Does NOT derive Serialize / Deserialize — this is a trait-boundary args struct, not a wire-format type; the #[non_exhaustive] marker already blocks cross-crate struct- literal construction, which matters more than JSON round-trip for a scanner hot-path primitive.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§execution_id: ExecutionId§lane_id: LaneId§worker_id: WorkerId§worker_instance_id: WorkerInstanceId§partition: Partition

Partition context for KEYS derivation. v0.12 PR-5.

§capability_hash: Option<String>§route_snapshot_json: Option<String>§admission_summary: Option<String>§worker_capabilities: BTreeSet<String>

Capabilities this worker advertises. Serialized as a sorted, comma-separated string to the Lua FCALL (see scheduling.lua ff_issue_claim_grant). An empty set matches only executions whose required_capabilities is also empty.

§grant_ttl_ms: u64§now: TimestampMs

Caller-side timestamp for bookkeeping. NOT passed to the Lua FCALL — ff_issue_claim_grant uses redis.call("TIME") for grant_expires_at.

Implementations§

Source§

impl IssueClaimGrantArgs

Source

pub fn new( execution_id: ExecutionId, lane_id: LaneId, worker_id: WorkerId, worker_instance_id: WorkerInstanceId, partition: Partition, worker_capabilities: BTreeSet<String>, grant_ttl_ms: u64, now: TimestampMs, ) -> Self

Construct an IssueClaimGrantArgs. Added alongside #[non_exhaustive] per feedback_non_exhaustive_needs_constructor so the SDK worker (and any future caller) can build the args without the struct literal becoming a cross-crate breaking change on every minor release.

Trait Implementations§

Source§

impl Clone for IssueClaimGrantArgs

Source§

fn clone(&self) -> IssueClaimGrantArgs

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IssueClaimGrantArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.