# hotreload A simple crate to hotreload toml config files. ## Usage ```rust use hotreload::{Hotreload, Apply}; #[derive(Default)] struct Config { value: Mutex } #[derive(serde::Deserialize)] struct Data { value: i32 } impl Apply for Config { fn apply(&self, data: Data) -> hotreload::ApplyResult { *self.value.lock().unwrap() = data.value; Ok(()) } } fn example() -> Result<(), hotreload::Error> { let watcher = Hotreload::::new("my-config.toml")?; let config: Arc = watcher.config().clone() } ``` ## License Licensed under either of * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) at your option.