Skip to main content

hb_cache_core_t

Struct hb_cache_core_t 

Source
pub struct hb_cache_core_t<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T: AtomicStorage> {
    values: [T; CACHE_SIZE],
}
Expand description

Core cache

Fields§

§values: [T; CACHE_SIZE]

Implementations§

Source§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T: AtomicStorage> hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>

Source

pub const MAX_VALUE: u32

Source

const CACHE_BITS: usize

Source

pub fn new() -> Self

Source

pub fn get(&self, key: u32) -> Option<u32>

Source

pub fn set(&self, key: u32, value: u32)

Source

fn set_unchecked(&self, key: u32, value: u32)

Trait Implementations§

Source§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T: Debug + AtomicStorage> Debug for hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T> Freeze for hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>
where T: Freeze,

§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T> RefUnwindSafe for hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>
where T: RefUnwindSafe,

§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T> Send for hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>
where T: Send,

§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T> Sync for hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>
where T: Sync,

§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T> Unpin for hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>
where T: Unpin,

§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T> UnsafeUnpin for hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>
where T: UnsafeUnpin,

§

impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T> UnwindSafe for hb_cache_core_t<KEY_BITS, VALUE_BITS, CACHE_SIZE, T>
where 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.

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.