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> 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
)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