pub struct ClaimToken {
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§
§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 · 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
Source§impl Hash for ClaimToken
impl Hash for ClaimToken
Source§impl PartialEq for ClaimToken
impl PartialEq for ClaimToken
impl Eq for ClaimToken
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.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>
Converts
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>
Converts
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