use crate::*; /// Collection of samples, one per slot, fixed number of slots. /// /// History: Separated to cleanly implement [Default]. /// /// ``` /// let samples = tek::SampleKit([None, None, None, None]); /// ``` #[derive(Debug)] pub struct SampleKit ( pub [Option>>;N] ); impl Default for SampleKit { fn default () -> Self { Self([const { None }; N]) } } impl SampleKit { pub fn get (&self, index: usize) -> &Option>> { if index < self.0.len() { &self.0[index] } else { &None } } }