1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use derive_new::new; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Serialize, Deserialize, new)] pub struct Sample { ticks: i64, } impl Sample { pub const fn ticks(&self) -> i64 { self.ticks } } pub const KIND: &str = "encoder";