AggregateFunctionAccumulator

Trait AggregateFunctionAccumulator 

pub trait AggregateFunctionAccumulator {
    // Required methods
    fn accumulate(&mut self, element: Term);
    fn finish(&mut self) -> Option<Term>;
}
Available on crate feature rdf only.
Expand description

A trait for custom aggregate function implementation.

The accumulator accumulates values using the accumulate method and returns a final aggregated value (or an error) using finish.

See [QueryEvaluator::with_custom_aggregate_function] for an example.

Required Methods§

fn accumulate(&mut self, element: Term)

fn finish(&mut self) -> Option<Term>

Implementors§