pub struct WorkflowTaskCleanupShard { /* private fields */ }Expand description
Stable assignment of tenants across cleanup processes.
Implementations§
Source§impl WorkflowTaskCleanupShard
impl WorkflowTaskCleanupShard
Sourcepub fn new(index: u32, count: NonZeroU32) -> Result<Self, WorkflowStoreError>
pub fn new(index: u32, count: NonZeroU32) -> Result<Self, WorkflowStoreError>
Sourcepub fn owns(self, tenant_id: &WorkflowTenantId) -> bool
pub fn owns(self, tenant_id: &WorkflowTenantId) -> bool
Returns whether this shard owns a tenant under the stable hash.
Trait Implementations§
Source§impl Clone for WorkflowTaskCleanupShard
impl Clone for WorkflowTaskCleanupShard
Source§fn clone(&self) -> WorkflowTaskCleanupShard
fn clone(&self) -> WorkflowTaskCleanupShard
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 moreimpl Copy for WorkflowTaskCleanupShard
Source§impl Debug for WorkflowTaskCleanupShard
impl Debug for WorkflowTaskCleanupShard
impl Eq for WorkflowTaskCleanupShard
Source§impl PartialEq for WorkflowTaskCleanupShard
impl PartialEq for WorkflowTaskCleanupShard
impl StructuralPartialEq for WorkflowTaskCleanupShard
Auto Trait Implementations§
impl Freeze for WorkflowTaskCleanupShard
impl RefUnwindSafe for WorkflowTaskCleanupShard
impl Send for WorkflowTaskCleanupShard
impl Sync for WorkflowTaskCleanupShard
impl Unpin for WorkflowTaskCleanupShard
impl UnsafeUnpin for WorkflowTaskCleanupShard
impl UnwindSafe for WorkflowTaskCleanupShard
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.