dump meta

This commit is contained in:
Marin Postma 2021-05-27 10:51:19 +02:00
parent b924e897f1
commit c47369839b
No known key found for this signature in database
GPG key ID: D5241F0C0C865F30
3 changed files with 82 additions and 54 deletions

View file

@ -16,6 +16,15 @@ pub struct MetadataV2 {
}
impl MetadataV2 {
pub fn new(index_db_size: u64, update_db_size: u64) -> Self {
Self {
db_version: env!("CARGO_PKG_VERSION").to_string(),
index_db_size,
update_db_size,
dump_date: Utc::now(),
}
}
pub fn load_dump(
self,
src: impl AsRef<Path>,