Skip to content

Commit

Permalink
add docs to CaseSensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
noib3 committed Nov 19, 2023
1 parent d3c10ec commit 981f836
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/case_sensitivity.rs
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,
}

0 comments on commit 981f836

Please sign in to comment.