pmtiles 0.2.2

Implementation of the PMTiles v3 spec with multiple sync and async backends.
Documentation
use std::string::FromUtf8Error;

#[derive(Debug)]
pub enum Error {
    InvalidMagicNumber,
    UnsupportedPmTilesVersion,
    InvalidCompression,
    InvalidEntry,
    InvalidHeader,
    InvalidMetadata,
    InvalidTileType,
    Reading(std::io::Error),
    #[cfg(feature = "fmmap")]
    UnableToOpenMmapFile,
    Http(String),
}

impl From<std::io::Error> for Error {
    fn from(e: std::io::Error) -> Self {
        Self::Reading(e)
    }
}

impl From<FromUtf8Error> for Error {
    fn from(_: FromUtf8Error) -> Self {
        Self::InvalidMetadata
    }
}