pub struct DiffReport {
pub added: Vec<TileChange>,
pub removed: Vec<TileChange>,
pub changed: Vec<TileChange>,
pub unchanged_count: u64,
}Expand description
Full per-tile diff between two PMTiles archives.
Each Vec is sorted by ascending tile_id. unchanged_count counts
tiles present in both archives whose FNV-1a content hashes match.
Fields§
§added: Vec<TileChange>Tiles present in the new archive but absent in the old archive.
removed: Vec<TileChange>Tiles present in the old archive but absent in the new archive.
changed: Vec<TileChange>Tiles present in both with differing FNV-1a content hashes.
unchanged_count: u64Tiles present in both with identical FNV-1a content hashes.
Implementations§
Source§impl DiffReport
impl DiffReport
Sourcepub fn total_changes(&self) -> usize
pub fn total_changes(&self) -> usize
Total number of changes (added + removed + changed).
Sourcepub fn total_added_bytes(&self) -> usize
pub fn total_added_bytes(&self) -> usize
Sum of byte lengths of all tiles in the Self::added list.
Sourcepub fn total_removed_bytes(&self) -> usize
pub fn total_removed_bytes(&self) -> usize
Sum of byte lengths of all tiles in the Self::removed list.
Sourcepub fn changed_byte_delta(&self) -> i64
pub fn changed_byte_delta(&self) -> i64
Net byte delta of changed tiles (new total minus old total).
A positive value means changed tiles grew on average; a negative value means they shrank.
Trait Implementations§
Source§impl Clone for DiffReport
impl Clone for DiffReport
Source§fn clone(&self) -> DiffReport
fn clone(&self) -> DiffReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiffReport
impl Debug for DiffReport
Source§impl Default for DiffReport
impl Default for DiffReport
Source§fn default() -> DiffReport
fn default() -> DiffReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DiffReport
impl RefUnwindSafe for DiffReport
impl Send for DiffReport
impl Sync for DiffReport
impl Unpin for DiffReport
impl UnsafeUnpin for DiffReport
impl UnwindSafe for DiffReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more