Enum mongodb::options::CollationStrength[][src]

#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.