pub trait MonadicCausableCollection<I, O, T>: CausableCollectionAccessor<I, O, T>where
T: MonadicCausable<I, O> + Causable,
O: Aggregatable + Clone + Default + Send + Sync + 'static + Debug,{
// Provided method
fn evaluate_collection(
&self,
incoming_effect: &PropagatingEffect<I>,
logic: &AggregateLogic,
threshold_value: Option<NumericalValue>,
) -> PropagatingEffect<O> { ... }
}Provided Methods§
Sourcefn evaluate_collection(
&self,
incoming_effect: &PropagatingEffect<I>,
logic: &AggregateLogic,
threshold_value: Option<NumericalValue>,
) -> PropagatingEffect<O>
fn evaluate_collection( &self, incoming_effect: &PropagatingEffect<I>, logic: &AggregateLogic, threshold_value: Option<NumericalValue>, ) -> PropagatingEffect<O>
Evaluates a collection of MonadicCausable items, aggregating their monadic effects.
This method provides a single, unified entry point for reasoning over a collection of causable items. It monadically evaluates each item and then uses a type-aware aggregation strategy to combine the results.
§Arguments
incoming_effect- APropagatingEffectto be passed to eachMonadicCausableitem.logic- TheAggregateLogic(e.g.,All,Any,None,Some(k)) that defines how the results are combined.threshold_value- An optionalNumericalValueused for comparisons (e.g., converting a probability to a boolean). It is required for some aggregation strategies.
§Returns
A PropagatingEffect representing the aggregated monadic effect of the collection.
§Errors
Returns a PropagatingEffect containing a CausalityError if:
- The collection is empty.
- An item’s
evaluatemethod returns an error.