Add derive Serialize to types
This commit is contained in:
@@ -9,11 +9,12 @@ use items_0::timebin::BinningggError;
|
||||
use items_0::timebin::BinsBoxed;
|
||||
use netpod::BinnedRange;
|
||||
use netpod::TsNano;
|
||||
use serde::Serialize;
|
||||
use std::any;
|
||||
|
||||
macro_rules! trace_init { ($($arg:tt)*) => ( if true { trace!($($arg)*); }) }
|
||||
macro_rules! trace_init { ($($arg:expr),*) => ( if true { trace!($($arg),*); }) }
|
||||
|
||||
macro_rules! trace_ingest_bin { ($($arg:tt)*) => ( if false { trace!($($arg)*); }) }
|
||||
macro_rules! trace_ingest_bin { ($($arg:expr),*) => ( if false { trace!($($arg),*); }) }
|
||||
|
||||
autoerr::create_error_v1!(
|
||||
name(Error, "BinBinsTimeweight"),
|
||||
@@ -22,7 +23,7 @@ autoerr::create_error_v1!(
|
||||
},
|
||||
);
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct BinnedBinsTimeweight<EVT, BVT>
|
||||
where
|
||||
EVT: EventValueType,
|
||||
@@ -35,6 +36,8 @@ where
|
||||
min: Option<EVT>,
|
||||
max: Option<EVT>,
|
||||
lst: Option<EVT>,
|
||||
// TODO
|
||||
#[serde(skip)]
|
||||
agg: <BVT as BinAggedType>::AggregatorTw,
|
||||
non_fnl: bool,
|
||||
out: ContainerBins<EVT, BVT>,
|
||||
|
||||
@@ -11,6 +11,7 @@ use items_0::timebin::IngestReport;
|
||||
use netpod::BinnedRange;
|
||||
use netpod::DtNano;
|
||||
use netpod::TsNano;
|
||||
use serde::Serialize;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
|
||||
@@ -408,14 +409,18 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct BinnedEventsTimeweight<EVT>
|
||||
where
|
||||
EVT: EventValueType,
|
||||
{
|
||||
range: BinnedRange<TsNano>,
|
||||
produce_cnt_zero: bool,
|
||||
#[serde(skip)]
|
||||
lst: Option<EventSingle<EVT>>,
|
||||
#[serde(skip)]
|
||||
inner_a: InnerA<EVT>,
|
||||
#[serde(skip)]
|
||||
out: ContainerBins<EVT, EVT::AggTimeWeightOutputAvg>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user