1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum Error {
#[error("could not initialize libpostal ({component})")]
#[non_exhaustive]
InitializationFailed { component: &'static str },
#[error("could not find libpostal data in any of {candidates:?}")]
#[non_exhaustive]
NoDataDir { candidates: &'static [&'static str] },
#[error("found a '\0' byte in {string:?}")]
#[non_exhaustive]
NullByteInString { string: String },
}