warthunder-leak-counter/src/sources/mod.rs
2024-06-22 13:42:24 -03:00

14 lines
350 B
Rust

use anyhow::Result;
mod wikipedia;
pub trait Source {
/// Return the URL to query
fn url(&self) -> String;
/// Given the content of the url figure out the date of the latest leak
fn latest_leak(&self, html: &str) -> Result<time::Date>;
}
pub fn sources() -> Vec<Box<dyn Source + Send>> {
vec![Box::new(wikipedia::Wikipedia)]
}