pub enum ClaimResult {
Success {
claim_token: ClaimToken,
},
AlreadyClaimed {
owner: String,
expires_at: u64,
},
TookOver {
previous_owner: String,
claim_token: ClaimToken,
},
NotFound,
Error(String),
}Expand description
Result of attempting to claim a task
Variants§
Success
Successfully claimed the task
Fields
§
claim_token: ClaimTokenThe claim token for subsequent operations
AlreadyClaimed
Task was already claimed by another worker
TookOver
Claim expired and was taken over
Fields
§
claim_token: ClaimTokenNew claim token
NotFound
Task not found
Error(String)
Internal error
Trait Implementations§
Source§impl Clone for ClaimResult
impl Clone for ClaimResult
Source§fn clone(&self) -> ClaimResult
fn clone(&self) -> ClaimResult
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 ClaimResult
impl Debug for ClaimResult
Source§impl PartialEq for ClaimResult
impl PartialEq for ClaimResult
impl Eq for ClaimResult
impl StructuralPartialEq for ClaimResult
Auto Trait Implementations§
impl Freeze for ClaimResult
impl RefUnwindSafe for ClaimResult
impl Send for ClaimResult
impl Sync for ClaimResult
impl Unpin for ClaimResult
impl UnsafeUnpin for ClaimResult
impl UnwindSafe for ClaimResult
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