pub struct IMMetadata<T>(/* private fields */)
where
T: PolarsDataType;
Expand description
An interiorally mutable Metadata
This is essentially a more convenient API around RwLock<Metadata>
. This also allows it to be
Clone
.
Implementations§
Source§impl<'a, T> IMMetadata<T>
impl<'a, T> IMMetadata<T>
Sourcepub fn upcast(&'a self) -> &'a RwLock<dyn MetadataTrait + 'a>
pub fn upcast(&'a self) -> &'a RwLock<dyn MetadataTrait + 'a>
Cast the IMMetadata
to a trait object of MetadataTrait
Sourcepub fn boxed_upcast(&'a self) -> Box<dyn MetadataTrait + 'a>
pub fn boxed_upcast(&'a self) -> Box<dyn MetadataTrait + 'a>
Cast the IMMetadata
to a boxed trait object of MetadataTrait
Source§impl<T> IMMetadata<T>where
T: PolarsDataType,
impl<T> IMMetadata<T>where
T: PolarsDataType,
pub const fn new(md: Metadata<T>) -> IMMetadata<T>
Sourcepub fn try_read(&self) -> Option<RwLockReadGuard<'_, Metadata<T>>>
pub fn try_read(&self) -> Option<RwLockReadGuard<'_, Metadata<T>>>
Try to grab a read guard to the Metadata
, this fails if this blocks.
Sourcepub fn read(&self) -> RwLockReadGuard<'_, Metadata<T>>
pub fn read(&self) -> RwLockReadGuard<'_, Metadata<T>>
Block to grab a read guard the Metadata
Sourcepub fn try_write(&self) -> Option<RwLockWriteGuard<'_, Metadata<T>>>
pub fn try_write(&self) -> Option<RwLockWriteGuard<'_, Metadata<T>>>
Try to grab a write guard to the Metadata
, this fails if this blocks.
Sourcepub fn write(&self) -> RwLockWriteGuard<'_, Metadata<T>>
pub fn write(&self) -> RwLockWriteGuard<'_, Metadata<T>>
Block to grab a write guard the Metadata
Trait Implementations§
Source§impl<T> Clone for IMMetadata<T>where
T: PolarsDataType,
impl<T> Clone for IMMetadata<T>where
T: PolarsDataType,
Source§fn clone(&self) -> IMMetadata<T>
fn clone(&self) -> IMMetadata<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Default for IMMetadata<T>where
T: PolarsDataType,
impl<T> Default for IMMetadata<T>where
T: PolarsDataType,
Source§fn default() -> IMMetadata<T>
fn default() -> IMMetadata<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> !Freeze for IMMetadata<T>
impl<T> RefUnwindSafe for IMMetadata<T>
impl<T> Send for IMMetadata<T>
impl<T> Sync for IMMetadata<T>
impl<T> Unpin for IMMetadata<T>
impl<T> UnwindSafe for IMMetadata<T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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