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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CollationStrength
impl Debug for CollationStrength
sourceimpl<'de> Deserialize<'de> for CollationStrength
impl<'de> Deserialize<'de> for CollationStrength
sourcefn deserialize<D>(
deserializer: D
) -> Result<CollationStrength, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<CollationStrength, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for CollationStrength
impl Display for CollationStrength
sourceimpl Serialize for CollationStrength
impl Serialize for CollationStrength
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl TryFrom<u32> for CollationStrength
impl TryFrom<u32> for CollationStrength
impl Copy for CollationStrength
Auto Trait Implementations
impl RefUnwindSafe for CollationStrength
impl Send for CollationStrength
impl Sync for CollationStrength
impl Unpin for CollationStrength
impl UnwindSafe for CollationStrength
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more