pub struct ClaimToken {
pub queue_id: String,
pub task_id: String,
pub owner: String,
pub instance: u64,
pub created_at: u64,
pub expires_at: u64,
}Expand description
A token proving ownership of a claimed task
This token must be presented for subsequent operations (ack, nack, extend). It prevents workers from operating on tasks they don’t own.
Fields§
§queue_id: StringQueue containing the task
task_id: StringTask being claimed
owner: StringOwner identity
instance: u64Unique claim instance (to detect stale tokens)
created_at: u64When the claim was created (epoch millis)
expires_at: u64When the claim expires (epoch millis)
Implementations§
Trait Implementations§
Source§impl Clone for ClaimToken
impl Clone for ClaimToken
Source§fn clone(&self) -> ClaimToken
fn clone(&self) -> ClaimToken
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClaimToken
impl Debug for ClaimToken
impl Eq for ClaimToken
Source§impl Hash for ClaimToken
impl Hash for ClaimToken
Source§impl PartialEq for ClaimToken
impl PartialEq for ClaimToken
Source§fn eq(&self, other: &ClaimToken) -> bool
fn eq(&self, other: &ClaimToken) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClaimToken
Auto Trait Implementations§
impl Freeze for ClaimToken
impl RefUnwindSafe for ClaimToken
impl Send for ClaimToken
impl Sync for ClaimToken
impl Unpin for ClaimToken
impl UnsafeUnpin for ClaimToken
impl UnwindSafe for ClaimToken
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.