Struct polars::prelude::StringCacheHolder
source · pub struct StringCacheHolder { /* private fields */ }
Expand description
Enable the global string cache as long as the object is alive (RAII).
§Examples
Enable the string cache by initializing the object:
use polars_core::StringCacheHolder;
let _sc = StringCacheHolder::hold();
The string cache is enabled until handle
is dropped.
§De-allocation
Multiple threads can hold the string cache at the same time. The contents of the cache will only get dropped when no thread holds it.
Implementations§
source§impl StringCacheHolder
impl StringCacheHolder
sourcepub fn hold() -> StringCacheHolder
pub fn hold() -> StringCacheHolder
Hold the StringCache
Trait Implementations§
source§impl Default for StringCacheHolder
impl Default for StringCacheHolder
source§fn default() -> StringCacheHolder
fn default() -> StringCacheHolder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StringCacheHolder
impl RefUnwindSafe for StringCacheHolder
impl Send for StringCacheHolder
impl Sync for StringCacheHolder
impl Unpin for StringCacheHolder
impl UnwindSafe for StringCacheHolder
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