norm/case_sensitivity.rs
1/// Case sensitivity modes for search.
2///
3/// This defines the different types of case sensitivity that can be used when
4/// searching for the characters of a query in a candidate string.
5#[derive(Copy, Clone, Debug, Default)]
6pub enum CaseSensitivity {
7 /// The search is case-sensitive. For a successful match the case of the
8 /// letters in the candidate must exactly match the case of the letters in
9 /// the query.
10 Sensitive,
11
12 /// The search is case-insensitive. In this mode, the case of letters is
13 /// ignored, allowing for matches regardless of whether the letters in the
14 /// query and candidate are upper or lower case.
15 Insensitive,
16
17 /// In this mode, the case-sensitivity of the search is determined
18 /// dynamically based on the letters of the query. If the query contains
19 /// one or more uppercase letters the search is treated as case-sensitive,
20 /// otherwise it's case-insensitive.
21 #[default]
22 Smart,
23}