pub struct ExecutionClaimer { /* private fields */ }Expand description
Execution claim tracker for single-owner semantics
Implementations§
Source§impl ExecutionClaimer
impl ExecutionClaimer
pub fn new() -> Self
Sourcepub fn try_claim(
&mut self,
execution_id: String,
claimant: String,
) -> Option<ExecutionClaim>
pub fn try_claim( &mut self, execution_id: String, claimant: String, ) -> Option<ExecutionClaim>
Attempt to claim an execution Returns the claim if successful, None if already claimed
Sourcepub fn get_claimant(&self, execution_id: &str) -> Option<&str>
pub fn get_claimant(&self, execution_id: &str) -> Option<&str>
Get the claimant of an execution
Sourcepub fn is_claimed_by(&self, execution_id: &str, claimant: &str) -> bool
pub fn is_claimed_by(&self, execution_id: &str, claimant: &str) -> bool
Check if execution is claimed by a specific peer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecutionClaimer
impl RefUnwindSafe for ExecutionClaimer
impl Send for ExecutionClaimer
impl Sync for ExecutionClaimer
impl Unpin for ExecutionClaimer
impl UnsafeUnpin for ExecutionClaimer
impl UnwindSafe for ExecutionClaimer
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