lwgeom 0.0.5

Rust bindings for the PostGIS LWGEOM geometry library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

pub type Result<T> = core::result::Result<T, LWGeomError>;

#[derive(Debug, Error)]
pub enum LWGeomError {
    #[error("failed to new CString")]
    CStringError(#[from] std::ffi::NulError),
    #[error("the ptr should not be null")]
    NullPtrError,
    #[error("function `{0}` parameter `{1}` is invalid")]
    InvalidParameterError(String, String),
    #[error("failed to calculate function `{0}` result")]
    CalculateError(String),
    #[error("failed to parse WKT: {0}")]
    WKTParseError(String),
}