#[non_exhaustive]pub struct ClaimPolicy {
pub max_wait: Option<Duration>,
pub worker_id: WorkerId,
pub worker_instance_id: WorkerInstanceId,
pub lease_ttl_ms: u32,
}Expand description
Policy hints for claim. Carries the worker identity the backend
needs to invoke ff_claim_execution (v0.7 Wave 2) plus the
blocking-wait bound.
Wave 2 extension: worker_id + worker_instance_id +
lease_ttl_ms are now required so the Valkey backend’s claim
impl can issue the claim FCALL without a side-channel identity
lookup. The constructor change is a pre-1.0 breaking change,
tracked in the CHANGELOG.
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.max_wait: Option<Duration>Maximum blocking wait. None means backend-default (today:
non-blocking / immediate return).
worker_id: WorkerIdWorker identity (stable across process restarts).
worker_instance_id: WorkerInstanceIdWorker instance identity (unique per process).
lease_ttl_ms: u32Lease TTL in milliseconds for the claim about to be minted.
Implementations§
Source§impl ClaimPolicy
impl ClaimPolicy
Sourcepub fn new(
worker_id: WorkerId,
worker_instance_id: WorkerInstanceId,
lease_ttl_ms: u32,
max_wait: Option<Duration>,
) -> ClaimPolicy
pub fn new( worker_id: WorkerId, worker_instance_id: WorkerInstanceId, lease_ttl_ms: u32, max_wait: Option<Duration>, ) -> ClaimPolicy
Build a claim policy. max_wait = None means non-blocking /
immediate return. lease_ttl_ms is the TTL the backend
installs on the minted lease.
Trait Implementations§
Source§impl Clone for ClaimPolicy
impl Clone for ClaimPolicy
Source§fn clone(&self) -> ClaimPolicy
fn clone(&self) -> ClaimPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClaimPolicy
impl Debug for ClaimPolicy
Source§impl PartialEq for ClaimPolicy
impl PartialEq for ClaimPolicy
impl Eq for ClaimPolicy
impl StructuralPartialEq for ClaimPolicy
Auto Trait Implementations§
impl Freeze for ClaimPolicy
impl RefUnwindSafe for ClaimPolicy
impl Send for ClaimPolicy
impl Sync for ClaimPolicy
impl Unpin for ClaimPolicy
impl UnsafeUnpin for ClaimPolicy
impl UnwindSafe for ClaimPolicy
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