pub enum ShardRoutingKind {
Modulus,
StableVirtual,
}Expand description
How keyed traffic maps into the virtual shard space (Tier 1 vs Tier 2).
Variants§
Modulus
Tier 1: hash(key) % active_count — keys remap when the count grows.
StableVirtual
Tier 2: fixed virtual id hash(key) % MAX_VIRTUAL_SHARDS with an active prefix.
Implementations§
Trait Implementations§
Source§impl Clone for ShardRoutingKind
impl Clone for ShardRoutingKind
Source§fn clone(&self) -> ShardRoutingKind
fn clone(&self) -> ShardRoutingKind
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 ShardRoutingKind
Source§impl Debug for ShardRoutingKind
impl Debug for ShardRoutingKind
impl Eq for ShardRoutingKind
Source§impl PartialEq for ShardRoutingKind
impl PartialEq for ShardRoutingKind
impl StructuralPartialEq for ShardRoutingKind
Auto Trait Implementations§
impl Freeze for ShardRoutingKind
impl RefUnwindSafe for ShardRoutingKind
impl Send for ShardRoutingKind
impl Sync for ShardRoutingKind
impl Unpin for ShardRoutingKind
impl UnsafeUnpin for ShardRoutingKind
impl UnwindSafe for ShardRoutingKind
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