Introduce EventAppendable

This commit is contained in:
Dominik Werder
2021-07-21 18:48:54 +02:00
parent d1401bffd5
commit 2502f7a574
14 changed files with 642 additions and 203 deletions

View File

@@ -54,6 +54,10 @@ pub enum ScalarType {
BOOL,
}
pub trait HasScalarType {
fn scalar_type(&self) -> ScalarType;
}
impl ScalarType {
pub fn from_dtype_index(ix: u8) -> Result<Self, Error> {
use ScalarType::*;
@@ -331,6 +335,10 @@ pub enum Shape {
Wave(u32),
}
pub trait HasShape {
fn shape(&self) -> Shape;
}
pub mod timeunits {
pub const MU: u64 = 1000;
pub const MS: u64 = MU * 1000;