Struct polars_utils::cache::FastFixedCache
source · pub struct FastFixedCache<K, V> { /* private fields */ }
Implementations§
source§impl<K: Hash + Eq, V> FastFixedCache<K, V>
impl<K: Hash + Eq, V> FastFixedCache<K, V>
pub fn new(n: usize) -> Self
pub fn get<Q: Hash + Eq + ?Sized>(&self, key: &Q) -> Option<&V>where
K: Borrow<Q>,
pub fn get_mut<Q: Hash + Eq + ?Sized>(&mut self, key: &Q) -> Option<&mut V>where
K: Borrow<Q>,
pub fn insert(&mut self, key: K, value: V) -> &mut V
pub fn get_or_insert_with<Q, F>(&mut self, key: &Q, f: F) -> &mut V
pub fn try_get_or_insert_with<Q, F, E>( &mut self, key: &Q, f: F ) -> Result<&mut V, E>
Trait Implementations§
Auto Trait Implementations§
impl<K, V> !Freeze for FastFixedCache<K, V>
impl<K, V> !RefUnwindSafe for FastFixedCache<K, V>
impl<K, V> Send for FastFixedCache<K, V>
impl<K, V> !Sync for FastFixedCache<K, V>
impl<K, V> Unpin for FastFixedCache<K, V>
impl<K, V> UnwindSafe for FastFixedCache<K, V>where
K: UnwindSafe,
V: UnwindSafe,
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more