mvt 0.13.0

A library for encoding mapbox vector tiles
Documentation
// error.rs
//
// Copyright (c) 2019-2026  Minnesota Department of Transportation
//

/// MVT Error types
#[non_exhaustive]
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// The tile already contains a layer with the specified name.
    #[error("Duplicate name")]
    DuplicateName(),

    /// The layer extent does not match the tile extent.
    #[error("Wrong layer extent")]
    WrongExtent(),

    /// The geometry does not meet criteria of the specification.
    #[error("Invalid geometry data")]
    InvalidGeometry(),

    /// Invalid float value
    #[error("Invalid float value")]
    InvalidValue(),

    /// Error while encoding protobuf data.
    #[error("Protobuf error {0}")]
    Protobuf(#[from] prost::EncodeError),

    #[error("{0}")]
    Io(#[from] std::io::Error),
}

/// MVT Result
pub type Result<T> = std::result::Result<T, Error>;