Refactor framed stream

This commit is contained in:
Dominik Werder
2024-07-24 12:06:30 +02:00
parent 06ac90aa70
commit a4228d03a4
27 changed files with 559 additions and 576 deletions

View File

@@ -151,6 +151,7 @@ pub trait Events:
fn pulses(&self) -> &VecDeque<u64>;
fn frame_type_id(&self) -> u32;
fn to_min_max_avg(&mut self) -> Box<dyn Events>;
fn to_json_string(&self) -> String;
fn to_json_vec_u8(&self) -> Vec<u8>;
fn to_cbor_vec_u8(&self) -> Vec<u8>;
fn clear(&mut self);
@@ -273,6 +274,10 @@ impl Events for Box<dyn Events> {
Events::to_min_max_avg(self.as_mut())
}
fn to_json_string(&self) -> String {
Events::to_json_string(self.as_ref())
}
fn to_json_vec_u8(&self) -> Vec<u8> {
Events::to_json_vec_u8(self.as_ref())
}