osrm-binding 0.1.7

Low-level, unsafe FFI bindings to the OSRM C++ library.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

#[derive(Error, Debug)]
pub enum OsrmError {
    #[error("Failed to create OSRM instance")]
    Initialization,
    #[error("Invalid path parameter: {0}")]
    InvalidPath(String),
    #[error("OSRM API error: {0}")]
    ApiError(String),
    #[error("Sources or destinations are invalid")]
    InvalidTableArgument,
    #[error("Failed to parse OSRM response: {0}")]
    JsonParse(#[from] serde_json::Error),
    #[error("Internal FFI error: {0}")]
    FfiError(String),
}