pub struct Bucket { /* private fields */ }Expand description
One index bucket.
Implementations§
Source§impl Bucket
impl Bucket
Sourcepub fn match_tag(&self, tag: u8) -> SlotMask ⓘ
pub fn match_tag(&self, tag: u8) -> SlotMask ⓘ
A bitmask over the seven slots whose tag equals tag.
Bit i of the result is set when slot i matches. This is the whole
prefilter: one load, an xor, a subtract, an and, and a shift.
Sourcepub fn match_empty(&self) -> SlotMask ⓘ
pub fn match_empty(&self) -> SlotMask ⓘ
A bitmask over the seven slots that are empty.
Sourcepub fn set(&mut self, i: usize, tag: u8, addr: Addr)
pub fn set(&mut self, i: usize, tag: u8, addr: Addr)
Put addr under tag in slot i.
§Panics
If tag is zero, which would make an occupied slot read as empty.
Sourcepub fn set_addr(&mut self, i: usize, addr: Addr)
pub fn set_addr(&mut self, i: usize, addr: Addr)
Replace the address in an occupied slot, keeping its tag.
Sourcepub fn clear(&mut self, i: usize)
pub fn clear(&mut self, i: usize)
Empty slot i.
Tombstone free (05 section 2.3). The tag goes back to zero and the
address is cleared so that a stale address cannot be followed by a
probe that races a concurrent split in a future revision.
Sourcepub fn has_overflow(&self) -> bool
pub fn has_overflow(&self) -> bool
Whether this bucket has an overflow bucket.
Sourcepub fn clear_link(&mut self)
pub fn clear_link(&mut self)
Detach the overflow bucket.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bucket
impl RefUnwindSafe for Bucket
impl Send for Bucket
impl Sync for Bucket
impl Unpin for Bucket
impl UnsafeUnpin for Bucket
impl UnwindSafe for Bucket
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