pub enum ValidationIssue {
HeaderMagicMismatch,
UnsupportedVersion(u8),
RootDirOutOfBounds {
offset: u64,
length: u64,
file_size: u64,
},
LeafDirOutOfBounds {
tile_id: u64,
offset: u64,
length: u64,
file_size: u64,
},
TileDataOutOfBounds {
tile_id: u64,
offset: u64,
length: u64,
file_size: u64,
},
OverlappingTiles {
tile_id_a: u64,
tile_id_b: u64,
},
NonMonotonicTileIds {
leaf_dir_tile_id: u64,
},
DirectoryDecodeError(String),
VarintTruncated {
at: u64,
},
}Expand description
A single integrity issue found during a validation pass over a PMTiles archive.
Variants§
HeaderMagicMismatch
The first 7 bytes do not match the PMTiles magic string, or the header could not be parsed at all.
UnsupportedVersion(u8)
The spec-version byte is not 3.
RootDirOutOfBounds
The root-directory byte range [offset, offset + length) exceeds the
reported file size.
Fields
LeafDirOutOfBounds
A leaf-directory pointer entry’s byte range [offset, offset + length)
within the leaf-dirs section exceeds the leaf-dirs section length.
Fields
TileDataOutOfBounds
A tile entry’s data range [tile_data_offset + offset, + length)
exceeds the total file size.
Fields
OverlappingTiles
Two tile entries have data ranges that overlap (excluding the case where
both offset+length values are equal, which is valid deduplication).
Fields
NonMonotonicTileIds
Within a single leaf directory the tile IDs are not non-decreasing.
Fields
DirectoryDecodeError(String)
The root or a leaf directory could not be decoded.
VarintTruncated
A varint in the directory was truncated before its terminal byte.
Trait Implementations§
Source§impl Clone for ValidationIssue
impl Clone for ValidationIssue
Source§fn clone(&self) -> ValidationIssue
fn clone(&self) -> ValidationIssue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ValidationIssue
impl Debug for ValidationIssue
Source§impl Display for ValidationIssue
impl Display for ValidationIssue
Source§impl PartialEq for ValidationIssue
impl PartialEq for ValidationIssue
Source§fn eq(&self, other: &ValidationIssue) -> bool
fn eq(&self, other: &ValidationIssue) -> bool
self and other values to be equal, and is used by ==.