Struct polars_core::series::unstable::UnstableSeries
source · pub struct UnstableSeries<'a> { /* private fields */ }
Available on crate feature
private
only.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) -> Self
pub fn deep_clone(&self) -> Series
sourcepub fn swap(&mut self, array: &mut ArrayRef)
pub fn swap(&mut self, array: &mut ArrayRef)
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 ArrayRef, f: F) -> Twhere
F: Fn(&UnstableSeries<'_>) -> T,
pub fn with_array<F, T>(&mut self, array: &mut ArrayRef, 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 more