1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! The crate-wide error type plus its `Result` alias.
//!
//! ## Design
//!
//! `geonative-core` defines one neutral error enum that every downstream
//! crate (`filegdb`, `geoparquet`, `shapefile`, `mvt`, …) can map into via
//! `From`. Drivers keep their own dialect-specific error types (`GdbError`,
//! `ShpError`, `MvtError`, …) for in-crate use; conversion to this
//! `Error` happens at the public-API boundary.
//!
//! ## Variants and when to use them
//!
//! - **`Io`** — wraps any `std::io::Error` unchanged (auto via `From`).
//! - **`Malformed`** — bytes parsed but didn't match the expected format
//! (truncated header, bad magic, varint overflow, etc.).
//! - **`Unsupported`** — input is valid but uses a feature we deliberately
//! don't handle (Z/M variants in v0.1, compressed FileGDB tables, etc.).
//! Distinguishes "the file is broken" from "we haven't built this yet".
//! - **`Schema`** — runtime schema mismatch (wrong attribute arity, type
//! mismatch on a non-null field, etc.).
//! - **`LayerNotFound`** — caller asked for a layer name that doesn't exist
//! in this dataset.
//! - **`Other`** — escape hatch for caller-supplied messages. Try not to
//! reach for this in new code.
use Error;
pub type Result<T> = Result;