Struct RawTable

Source
pub struct RawTable<T: Invariant, S = DefaultHashBuilder, A: Allocator = HashTableAlloc> { /* private fields */ }

Implementations§

Source§

impl<T: Invariant> RawTable<T, DefaultHashBuilder, HashTableAlloc>

Source

pub fn new() -> Self

Source§

impl<T: Invariant, S, A: Allocator> RawTable<T, S, A>

Source

pub fn hasher(&self) -> &S

Source

pub fn allocator(&self) -> &A

Source

pub fn len(&self) -> usize

Source

pub fn capacity(&self) -> usize

Source

pub fn with_hasher_in(hasher: S, alloc: A) -> Self

Source

pub fn remove( &mut self, hash: u64, eq: impl FnMut(&T) -> bool, ctx: &impl CtxMut, ) -> Option<T>

Source

pub fn get( &self, hash: u64, eq: impl FnMut(&T) -> bool, ctx: &impl Ctx, ) -> Option<&T>

Source

pub fn get_mut<'a>( &mut self, hash: u64, eq: impl FnMut(&T) -> bool, ctx: &'a impl CtxMut, ) -> Option<&'a mut T>

Source

pub fn clear(&mut self)

Source

pub fn carry_ctx(&self) -> CarryCtx<'_>

Source

pub fn carry_ctx_mut<'a>( &self, base: &RefMut<'a, RawTable<T, S, A>>, ) -> CarryCtxMut<'a>

Source

pub unsafe fn iter(&self) -> RawIter<T>

Source

pub unsafe fn backing(&self) -> Ref<'_, u8>

Source

pub unsafe fn backing_mut(&mut self) -> RefMut<'_, u8>

Source§

impl<T: Invariant, S> RawTable<T, S, HashTableAlloc>

Source

pub fn bootstrap(&mut self, capacity: usize) -> Result<()>

Source

pub fn reserve( &mut self, additional: usize, hasher: impl Fn(&T) -> u64, ctx: &impl CtxMut, )

Source

pub fn reserve_rehash( &mut self, additional: usize, hasher: impl Fn(&T) -> u64, ctx: &impl CtxMut, ) -> Result<()>

Source

pub unsafe fn resize( &mut self, capacity: usize, hasher: impl Fn(&T) -> u64, ctx: &impl CtxMut, ) -> Result<()>

Source

pub fn find_or_find_insert_slot( &mut self, hash: u64, eq: impl FnMut(&T) -> bool, hasher: impl Fn(&T) -> u64, ctx: &impl CtxMut, ) -> Result<Ref<'_, T>, usize>

Source

pub unsafe fn insert_in_slot( &mut self, hash: u64, slot: usize, value: T, ctx: &impl CtxMut, )

Trait Implementations§

Source§

impl<T: Invariant, S, A: Allocator> BaseType for RawTable<T, S, A>

Source§

fn fingerprint() -> u64

The fingerprint of this type.

Auto Trait Implementations§

§

impl<T, S, A> Freeze for RawTable<T, S, A>
where S: Freeze, A: Freeze,

§

impl<T, S = RandomState, A = HashTableAlloc> !ObjSafe for RawTable<T, S, A>

§

impl<T, S, A> RefUnwindSafe for RawTable<T, S, A>

§

impl<T, S = RandomState, A = HashTableAlloc> !Send for RawTable<T, S, A>

§

impl<T, S = RandomState, A = HashTableAlloc> !StoreCopy for RawTable<T, S, A>

§

impl<T, S = RandomState, A = HashTableAlloc> !Sync for RawTable<T, S, A>

§

impl<T, S = RandomState, A = HashTableAlloc> !Unpin for RawTable<T, S, A>

§

impl<T, S, A> UnwindSafe for RawTable<T, S, A>
where S: UnwindSafe, A: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more