Struct polars_core::series::amortized_iter::AmortSeries   
source · pub struct AmortSeries { /* private fields */ }Expand description
A [Series] that amortizes a few allocations during iteration.
Implementations§
source§impl AmortSeries
 
impl AmortSeries
pub fn new(series: Rc<Series>) -> Self
pub fn deep_clone(&self) -> Series
sourcepub unsafe fn swap(&mut self, array: &mut ArrayRef)
 
pub unsafe fn swap(&mut self, array: &mut ArrayRef)
Swaps inner state with the array. Prefer AmortSeries::with_array as this
restores the state.
§Safety
This swaps an underlying pointer that might be hold by other cloned series.
sourcepub unsafe fn with_array<F, T>(&mut self, array: &mut ArrayRef, f: F) -> Twhere
    F: Fn(&AmortSeries) -> T,
 
pub unsafe fn with_array<F, T>(&mut self, array: &mut ArrayRef, f: F) -> Twhere
    F: Fn(&AmortSeries) -> T,
Temporary swaps out the array, and restores the original state
when application of the function f is done.
§Safety
Array must be from Series physical dtype.
Trait Implementations§
source§impl AsRef<Series> for AmortSeries
 
impl AsRef<Series> for AmortSeries
We don’t implement Deref so that the caller is aware of converting to Series
source§impl Clone for AmortSeries
 
impl Clone for AmortSeries
source§fn clone(&self) -> AmortSeries
 
fn clone(&self) -> AmortSeries
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 moreAuto Trait Implementations§
impl Freeze for AmortSeries
impl !RefUnwindSafe for AmortSeries
impl !Send for AmortSeries
impl !Sync for AmortSeries
impl Unpin for AmortSeries
impl !UnwindSafe for AmortSeries
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