WIP pipeline post processor checks, but no general make frame yet
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::agg::binnedt::{AggregatableTdim, AggregatorTdim};
|
||||
use crate::agg::streams::{Appendable, Bins, StreamItem};
|
||||
use crate::agg::streams::{Appendable, Bins, StreamItem, ToJsonBytes};
|
||||
use crate::agg::{AggregatableXdim1Bin, Fits, FitsInside};
|
||||
use crate::binned::{MakeBytesFrame, RangeCompletableItem, StreamKind};
|
||||
use crate::frame::makeframe::make_frame;
|
||||
@@ -331,3 +331,9 @@ impl Appendable for MinMaxAvgScalarBinBatch {
|
||||
self.avgs.extend_from_slice(&src.avgs);
|
||||
}
|
||||
}
|
||||
|
||||
impl ToJsonBytes for MinMaxAvgScalarBinBatch {
|
||||
fn to_json_bytes(&self) -> Result<Vec<u8>, Error> {
|
||||
Ok(serde_json::to_vec(self)?)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,12 @@ pub trait CollectionSpecMaker2 {
|
||||
fn spec(bin_count_exp: u32) -> Box<dyn CollectionSpec2>;
|
||||
}
|
||||
|
||||
pub trait ToJsonBytes {
|
||||
fn to_json_bytes(&self) -> Result<Vec<u8>, Error>;
|
||||
}
|
||||
|
||||
pub trait ToJsonResult {
|
||||
type Output;
|
||||
fn to_json_result(&self) -> Result<Self::Output, Error>;
|
||||
fn to_json_result(&self) -> Result<Box<dyn ToJsonBytes>, Error>;
|
||||
}
|
||||
|
||||
pub trait Appendable: WithLen {
|
||||
|
||||
Reference in New Issue
Block a user