pub struct FastTier<const CAPACITY: usize> { /* private fields */ }Expand description
A direct-mapped (1-way) fast tier optimized for T0 zero-cost lookups. It uses exactly 1 atomic load for maximum throughput.
Implementations§
Source§impl<const CAPACITY: usize> FastTier<CAPACITY>
impl<const CAPACITY: usize> FastTier<CAPACITY>
pub const fn new() -> Self
pub fn get_slot_idx(&self, hash: usize) -> u32
pub fn insert_idx(&self, hash: usize, node_idx: u32) -> u32
Sourcepub unsafe fn insert_promote<K, V, const N: usize>(
&self,
arena: &Arena<K, V, N>,
hash: usize,
key: K,
value: V,
node: *mut ThreadStateNode,
)
pub unsafe fn insert_promote<K, V, const N: usize>( &self, arena: &Arena<K, V, N>, hash: usize, key: K, value: V, node: *mut ThreadStateNode, )
§Safety
The caller must ensure that node is a valid pointer to a ThreadStateNode
and that the thread state is active.
pub fn clear(&self)
Trait Implementations§
Auto Trait Implementations§
impl<const CAPACITY: usize> !Freeze for FastTier<CAPACITY>
impl<const CAPACITY: usize> RefUnwindSafe for FastTier<CAPACITY>
impl<const CAPACITY: usize> Send for FastTier<CAPACITY>
impl<const CAPACITY: usize> Sync for FastTier<CAPACITY>
impl<const CAPACITY: usize> Unpin for FastTier<CAPACITY>
impl<const CAPACITY: usize> UnsafeUnpin for FastTier<CAPACITY>
impl<const CAPACITY: usize> UnwindSafe for FastTier<CAPACITY>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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