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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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