diff options
Diffstat (limited to 'src/data.rs')
-rw-r--r-- | src/data.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/data.rs b/src/data.rs index 75ce565..abce42e 100644 --- a/src/data.rs +++ b/src/data.rs @@ -22,7 +22,6 @@ use std::error; use std::hash::Hash; -use std::time::Duration; pub mod effective; pub mod kinds; @@ -35,10 +34,7 @@ mod tests; /// A source of data. pub trait DataSourceBase: std::fmt::Display { /// Refreshes the data associated with this source. - fn update(&mut self) -> ( - Option<Duration>, - Result<(), Box<dyn error::Error + Send + Sync + 'static>>, - ); + fn update(&mut self) -> Update; /// Returns whether this data source contains any (valid) data. /// @@ -93,8 +89,6 @@ pub trait OverridableKind: Kind { /// Stats about an update. #[derive(Default)] pub struct Update { - /// Time until next refresh, if known. - pub refresh: Option<Duration>, /// Errors collected in an update. pub errors: Vec<Box<dyn error::Error + Send + Sync + 'static>>, } |