pub struct LazyDerivedSeries { /* private fields */ }Expand description
Lazy wrapper around a derived series definition that caches its result.
The expression is only evaluated when get() is called for the first time
(or after invalidate()), and the result is cached for subsequent reads.
Implementations§
Source§impl LazyDerivedSeries
impl LazyDerivedSeries
Sourcepub fn new(definition: DerivedSeriesDefinition) -> Self
pub fn new(definition: DerivedSeriesDefinition) -> Self
Creates a new lazy-evaluated derived series.
Sourcepub fn get(
&self,
ctx: &MultiSeriesContext,
) -> Result<Vec<f64>, MultivariateError>
pub fn get( &self, ctx: &MultiSeriesContext, ) -> Result<Vec<f64>, MultivariateError>
Returns the cached result, evaluating the expression if needed.
Sourcepub fn invalidate(&self)
pub fn invalidate(&self)
Invalidates the cached result, forcing re-evaluation on next get().
Sourcepub fn definition(&self) -> &DerivedSeriesDefinition
pub fn definition(&self) -> &DerivedSeriesDefinition
Returns the underlying definition.
Auto Trait Implementations§
impl !Freeze for LazyDerivedSeries
impl !RefUnwindSafe for LazyDerivedSeries
impl !UnwindSafe for LazyDerivedSeries
impl Send for LazyDerivedSeries
impl Sync for LazyDerivedSeries
impl Unpin for LazyDerivedSeries
impl UnsafeUnpin for LazyDerivedSeries
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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