Skip to main content

TileChange

Enum TileChange 

Source
pub enum TileChange {
    Added {
        tile_id: u64,
        z: u8,
        x: u32,
        y: u32,
        new_bytes: usize,
    },
    Removed {
        tile_id: u64,
        z: u8,
        x: u32,
        y: u32,
        old_bytes: usize,
    },
    Changed {
        tile_id: u64,
        z: u8,
        x: u32,
        y: u32,
        old_bytes: usize,
        new_bytes: usize,
    },
}
Expand description

A single per-tile change reported by diff_archives.

Every variant carries the PMTiles v3 tile_id along with the resolved (z, x, y) coordinates and the relevant byte size(s). This is enough to drive most downstream tooling (CDN purge lists, sync utilities, audit logs) without requiring access to the original archives.

Variants§

§

Added

Tile present in the new archive but absent in the old archive.

Fields

§tile_id: u64

PMTiles v3 Hilbert-curve tile ID.

§z: u8

Zoom level resolved from the tile ID.

§x: u32

Tile column resolved from the tile ID.

§y: u32

Tile row resolved from the tile ID.

§new_bytes: usize

Byte length of the tile payload in the new archive.

§

Removed

Tile present in the old archive but absent in the new archive.

Fields

§tile_id: u64

PMTiles v3 Hilbert-curve tile ID.

§z: u8

Zoom level resolved from the tile ID.

§x: u32

Tile column resolved from the tile ID.

§y: u32

Tile row resolved from the tile ID.

§old_bytes: usize

Byte length of the tile payload in the old archive.

§

Changed

Tile present in both archives with different content.

Fields

§tile_id: u64

PMTiles v3 Hilbert-curve tile ID.

§z: u8

Zoom level resolved from the tile ID.

§x: u32

Tile column resolved from the tile ID.

§y: u32

Tile row resolved from the tile ID.

§old_bytes: usize

Byte length of the tile payload in the old archive.

§new_bytes: usize

Byte length of the tile payload in the new archive.

Implementations§

Source§

impl TileChange

Source

pub fn tile_id(&self) -> u64

PMTiles v3 tile ID of the changed tile, regardless of variant.

Source

pub fn zoom(&self) -> u8

Resolved zoom level of the changed tile.

Source

pub fn xy(&self) -> (u32, u32)

Resolved (x, y) tile column/row.

Trait Implementations§

Source§

impl Clone for TileChange

Source§

fn clone(&self) -> TileChange

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TileChange

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TileChange

Source§

impl PartialEq for TileChange

Source§

fn eq(&self, other: &TileChange) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for TileChange

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.