Functions that return anything other than void need to provide an interface to collect results into. It'll be up to the implementation to determine what to do with the results, such as track each registered value or accumulate all results together. Query Callback functions that operate in single mode can return the result type from the function and the result will automatically be added. Query Callback functions that work in batch mode require having a TResult<...>& argument where results are written to.