Struct polars::series::unstable::UnstableSeries
source · pub struct UnstableSeries<'a> { /* private fields */ }
Expand description
A wrapper type that should make it a bit more clear that we should not clone Series
Implementations§
source§impl<'a> UnstableSeries<'a>
impl<'a> UnstableSeries<'a>
pub fn new(series: &'a mut Series) -> UnstableSeries<'a>
pub fn deep_clone(&self) -> Series
sourcepub fn swap(&mut self, array: &mut Box<dyn Array>)
pub fn swap(&mut self, array: &mut Box<dyn Array>)
Swaps inner state with the array
. Prefer UnstableSeries::with_array
as this
restores the state.
sourcepub fn with_array<F, T>(&mut self, array: &mut Box<dyn Array>, f: F) -> Twhere
F: Fn(&UnstableSeries<'_>) -> T,
pub fn with_array<F, T>(&mut self, array: &mut Box<dyn Array>, f: F) -> Twhere
F: Fn(&UnstableSeries<'_>) -> T,
Temporary swaps out the array, and restores the original state
when application of the function f
is done.
Trait Implementations§
source§impl AsMut<Series> for UnstableSeries<'_>
impl AsMut<Series> for UnstableSeries<'_>
source§impl AsRef<Series> for UnstableSeries<'_>
impl AsRef<Series> for UnstableSeries<'_>
We don’t implement Deref so that the caller is aware of converting to Series
source§impl<'a> Clone for UnstableSeries<'a>
impl<'a> Clone for UnstableSeries<'a>
source§fn clone(&self) -> UnstableSeries<'a>
fn clone(&self) -> UnstableSeries<'a>
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 moreimpl<'a> Copy for UnstableSeries<'a>
Auto Trait Implementations§
impl<'a> Freeze for UnstableSeries<'a>
impl<'a> !RefUnwindSafe for UnstableSeries<'a>
impl<'a> !Send for UnstableSeries<'a>
impl<'a> !Sync for UnstableSeries<'a>
impl<'a> Unpin for UnstableSeries<'a>
impl<'a> !UnwindSafe for UnstableSeries<'a>
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