1use displaydoc::Display;
6
7#[derive(Debug, Copy, Clone, PartialEq, Eq, Display)]
9#[non_exhaustive]
10pub enum ZeroTrieBuildError {
11 #[displaydoc("Non-ASCII cannot be added to an ASCII-only trie")]
13 NonAsciiError,
14 #[displaydoc("Reached maximum capacity of trie")]
16 CapacityExceeded,
17 #[displaydoc("Failed to solve the perfect hash function. This is rare! Please report your case to the ICU4X team.")]
19 CouldNotSolvePerfectHash,
20 #[displaydoc("Mixed-case data added to case-insensitive trie")]
22 MixedCase,
23}
24
25impl core::error::Error for ZeroTrieBuildError {}