Enum mungos::options::CollationStrength
source · [−]#[non_exhaustive]
pub enum CollationStrength {
Primary,
Secondary,
Tertiary,
Quaternary,
Identical,
}
Expand description
The level of comparison to perform. Corresponds to ICU Comparison Levels.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Primary
Typically, this is used to denote differences between base characters (for example, “a” < “b”).
This is also called the level-1 strength.
Secondary
Accents in the characters are considered secondary differences (for example, “as” < “às” < “at”).
This is also called the level-2 strength.
Tertiary
Upper and lower case differences in characters are distinguished at the tertiary level (for example, “ao” < “Ao” < “aò”).
This is also called the level-3 strength.
Quaternary
When punctuation is ignored at level 1-3, an additional level can be used to distinguish words with and without punctuation (for example, “ab” < “a-b” < “aB”).
This is also called the level-4 strength.
Identical
When all other levels are equal, the identical level is used as a tiebreaker. The Unicode code point values of the NFD form of each string are compared at this level, just in case there is no difference at levels 1-4.
This is also called the level-5 strength.
Trait Implementations
sourceimpl Clone for CollationStrength
impl Clone for CollationStrength
sourcefn clone(&self) -> CollationStrength
fn clone(&self) -> CollationStrength
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more