Move binned type, add tests

This commit is contained in:
Dominik Werder
2022-12-05 12:01:19 +01:00
parent 4a250227cd
commit aa74fd4f25
33 changed files with 1988 additions and 699 deletions

View File

@@ -5,6 +5,7 @@ use serde::Serialize;
use std::any::Any;
use std::fmt;
// TODO rename to `Typed`
pub trait CollectorType: Send + Unpin + WithLen {
type Input: Collectable;
type Output: Collected + ToJsonResult + Serialize;
@@ -24,6 +25,7 @@ pub trait Collector: Send + Unpin + WithLen {
fn result(&mut self) -> Result<Box<dyn ToJsonResult>, Error>;
}
// TODO rename to `Typed`
pub trait CollectableType {
type Collector: CollectorType<Input = Self>;
fn new_collector() -> Self::Collector;