pub struct HashLocator {
pub shards: u32,
}Expand description
Routes hash(key) % shards — an even spread over a fixed shard count, for
when there’s no shard-encoded id to decode (e.g. partitioning a directory by
a hashed key). Resharding still needs a rebalance plan; this is not a
consistent hash.
Fields§
§shards: u32Implementations§
Trait Implementations§
Source§impl Clone for HashLocator
impl Clone for HashLocator
impl Copy for HashLocator
Source§impl Debug for HashLocator
impl Debug for HashLocator
Source§impl ShardLocator for HashLocator
impl ShardLocator for HashLocator
Auto Trait Implementations§
impl Freeze for HashLocator
impl RefUnwindSafe for HashLocator
impl Send for HashLocator
impl Sync for HashLocator
impl Unpin for HashLocator
impl UnsafeUnpin for HashLocator
impl UnwindSafe for HashLocator
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