Glue to transition to different events container
This commit is contained in:
@@ -368,7 +368,8 @@ impl FrameType for EventQueryJsonStringFrame {
|
||||
pub trait EventsNodeProcessorOutput:
|
||||
Send + Unpin + DeserializeOwned + WithTimestamps + TimeBinnableType + ByteEstimate
|
||||
{
|
||||
fn into_parts<NTY>(self) -> (VecDeque<NTY>, VecDeque<u64>);
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any;
|
||||
fn into_parts(self) -> (Box<dyn Any>, VecDeque<u64>, VecDeque<u64>);
|
||||
}
|
||||
|
||||
pub trait EventsNodeProcessor: Send + Unpin {
|
||||
|
||||
@@ -827,7 +827,15 @@ impl<NTY> EventsNodeProcessorOutput for ScalarEvents<NTY>
|
||||
where
|
||||
NTY: NumOps,
|
||||
{
|
||||
fn into_parts<NTY2>(self) -> (VecDeque<NTY2>, VecDeque<u64>) {
|
||||
todo!()
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any {
|
||||
self
|
||||
}
|
||||
|
||||
fn into_parts(self) -> (Box<dyn Any>, VecDeque<u64>, VecDeque<u64>) {
|
||||
(
|
||||
Box::new(VecDeque::from(self.values)),
|
||||
self.tss.into(),
|
||||
self.pulses.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use err::Error;
|
||||
use netpod::log::*;
|
||||
use netpod::{NanoRange, Shape};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::any::Any;
|
||||
use std::collections::VecDeque;
|
||||
use std::fmt;
|
||||
use tokio::fs::File;
|
||||
@@ -423,7 +424,11 @@ impl EventAppendable for StatsEvents {
|
||||
}
|
||||
|
||||
impl EventsNodeProcessorOutput for StatsEvents {
|
||||
fn into_parts<NTY2>(self) -> (VecDeque<NTY2>, VecDeque<u64>) {
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any {
|
||||
self
|
||||
}
|
||||
|
||||
fn into_parts(self) -> (Box<dyn Any>, VecDeque<u64>, VecDeque<u64>) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ use items_0::subfr::SubFrId;
|
||||
use netpod::log::*;
|
||||
use netpod::{x_bin_count, AggKind, NanoRange, Shape};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::any::Any;
|
||||
use std::collections::VecDeque;
|
||||
use std::marker::PhantomData;
|
||||
use tokio::fs::File;
|
||||
@@ -540,7 +541,11 @@ impl<NTY> EventsNodeProcessorOutput for WaveEvents<NTY>
|
||||
where
|
||||
NTY: NumOps,
|
||||
{
|
||||
fn into_parts<NTY2>(self) -> (VecDeque<NTY2>, VecDeque<u64>) {
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any {
|
||||
self
|
||||
}
|
||||
|
||||
fn into_parts(self) -> (Box<dyn Any>, VecDeque<u64>, VecDeque<u64>) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use std::any::Any;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use crate::binsdim0::MinMaxAvgDim0Bins;
|
||||
@@ -509,7 +510,11 @@ impl<NTY> EventsNodeProcessorOutput for XBinnedScalarEvents<NTY>
|
||||
where
|
||||
NTY: NumOps,
|
||||
{
|
||||
fn into_parts<NTY2>(self) -> (VecDeque<NTY2>, VecDeque<u64>) {
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any {
|
||||
self
|
||||
}
|
||||
|
||||
fn into_parts(self) -> (Box<dyn Any>, VecDeque<u64>, VecDeque<u64>) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ use netpod::log::*;
|
||||
use netpod::timeunits::*;
|
||||
use netpod::{NanoRange, Shape};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::any::Any;
|
||||
use std::collections::VecDeque;
|
||||
use std::mem;
|
||||
use tokio::fs::File;
|
||||
@@ -539,7 +540,11 @@ impl<NTY> EventsNodeProcessorOutput for XBinnedWaveEvents<NTY>
|
||||
where
|
||||
NTY: NumOps,
|
||||
{
|
||||
fn into_parts<NTY2>(self) -> (VecDeque<NTY2>, VecDeque<u64>) {
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any {
|
||||
self
|
||||
}
|
||||
|
||||
fn into_parts(self) -> (Box<dyn Any>, VecDeque<u64>, VecDeque<u64>) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user