use displaydoc::Display;
#[derive(Debug, Copy, Clone, PartialEq, Eq, Display)]
#[non_exhaustive]
pub enum ZeroTrieBuildError {
#[displaydoc("Non-ASCII cannot be added to an ASCII-only trie")]
NonAsciiError,
#[displaydoc("Reached maximum capacity of trie")]
CapacityExceeded,
#[displaydoc("Failed to solve the perfect hash function. This is rare! Please report your case to the ICU4X team.")]
CouldNotSolvePerfectHash,
#[displaydoc("Mixed-case data added to case-insensitive trie")]
MixedCase,
#[displaydoc("Delimiter is contained in one or more strings")]
IllegalDelimiter,
}
impl core::error::Error for ZeroTrieBuildError {}