(label: &'static str, path: PathBuf, delay: Duration)
| 32 | T: Serialize + Send + 'static, |
| 33 | { |
| 34 | pub fn new(label: &'static str, path: PathBuf, delay: Duration) -> Self { |
| 35 | Self { |
| 36 | label, |
| 37 | path, |
| 38 | delay, |
| 39 | runtime: shared_tokio_runtime(), |
| 40 | state: Arc::new(Mutex::new(DebouncedJsonWriterState { |
| 41 | pending: None, |
| 42 | task_running: false, |
| 43 | })), |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | pub fn schedule_save(&self, value: T) { |
| 48 | let should_spawn = { |
nothing calls this directly
no test coverage detected