pub struct AllocationKey<const NUM_SHARDS: usize> { /* private fields */ }Expand description
Precomputed shard and bucket indices for a given allocation address.
Implementations§
Source§impl<const NUM_SHARDS: usize> AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> AllocationKey<NUM_SHARDS>
Sourcepub const fn make(address: u64) -> AllocationKey<NUM_SHARDS>
pub const fn make(address: u64) -> AllocationKey<NUM_SHARDS>
Computes the key for address when the table is partitioned into NUM_SHARDS shards.
pub const fn shard_index(&self) -> usize
pub const fn address(&self) -> u64
Trait Implementations§
Source§impl<const NUM_SHARDS: usize> Clone for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Clone for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Copy for AllocationKey<NUM_SHARDS>
Source§impl<const NUM_SHARDS: usize> Debug for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Debug for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Eq for AllocationKey<NUM_SHARDS>
Source§impl<const NUM_SHARDS: usize> PartialEq for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> PartialEq for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> StructuralPartialEq for AllocationKey<NUM_SHARDS>
Auto Trait Implementations§
impl<const NUM_SHARDS: usize> Freeze for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> RefUnwindSafe for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Send for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Sync for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Unpin for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> UnsafeUnpin for AllocationKey<NUM_SHARDS>
impl<const NUM_SHARDS: usize> UnwindSafe for AllocationKey<NUM_SHARDS>
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