-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
/// TODO: docs | ||
/// Case sensitivity modes for search. | ||
/// | ||
/// This defines the different types of case sensitivity that can be used when | ||
/// searching for the characters of a query in a candidate string. | ||
#[derive(Copy, Clone, Debug, Default)] | ||
pub enum CaseSensitivity { | ||
/// TODO: docs | ||
/// The search is case-sensitive. For a successful match the case of the | ||
/// letters in the candidate must exactly match the case of the letters in | ||
/// the query. | ||
Sensitive, | ||
|
||
/// TODO: docs | ||
/// The search is case-insensitive. In this mode, the case of letters is | ||
/// ignored, allowing for matches regardless of whether the letters in the | ||
/// query and candidate are upper or lower case. | ||
Insensitive, | ||
|
||
/// TODO: docs | ||
/// In this mode, the case-sensitivity of the search is determined | ||
/// dynamically based on the letters of the query. If the query contains | ||
/// one or more uppercase letters the search is treated as case-sensitive, | ||
/// otherwise it's case-insensitive. | ||
#[default] | ||
Smart, | ||
} |