pub struct DependantMeasure {
pub name: String,
pub calculator: Box<dyn Fn(&BTreeMap<String, String>) -> Result<Expr, PolarsError> + Sync + Send>,
pub depends_upon: Vec<(String, String)>,
}Expand description
Dependant Measure cannot be computed directly. Instead it is broken down into it’s parents parents get executed, and then used to compute the DependantMeasure.
Useful for caching.
No precomputefilter - it is inherited from parents
Fields§
§name: String§calculator: Box<dyn Fn(&BTreeMap<String, String>) -> Result<Expr, PolarsError> + Sync + Send>executed within .with_columns() context
depends_upon: Vec<(String, String)>parameters which will go into calculator Vec<(Depends Upon Measure Name, Aggregation type)> eg vec![(FXDeltaCharge, scalar), (Sensitivity, mean)]
Trait Implementations§
Source§impl Debug for DependantMeasure
impl Debug for DependantMeasure
Source§impl From<DependantMeasure> for Measure
impl From<DependantMeasure> for Measure
Source§fn from(item: DependantMeasure) -> Measure
fn from(item: DependantMeasure) -> Measure
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for DependantMeasure
impl !UnwindSafe for DependantMeasure
impl Freeze for DependantMeasure
impl Send for DependantMeasure
impl Sync for DependantMeasure
impl Unpin for DependantMeasure
impl UnsafeUnpin for DependantMeasure
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> 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