pub struct MatchOptions {
pub case_sensitive: bool,
pub diacritic_sensitive: bool,
pub whole_word: bool,
pub locale: FoldLocale,
}Expand description
How to match.
Fields§
§case_sensitive: boolfalse (the default) folds case — which is why the index map is not optional.
diacritic_sensitive: boolfalse (the default) folds diacritics, ligatures and Arabic orthography, so that
aurelien finds Aurélien and احمد finds أَحْمَد.
whole_word: boolOnly match when the occurrence begins and ends on a word boundary.
locale: FoldLocaleThe language of the text being searched — per scene, not per search. One pass can fold a French chapter and a Turkish one under different rules; the user’s toggles above stay global, and the language only decides what folding means.
Implementations§
Source§impl MatchOptions
impl MatchOptions
Sourcepub fn fold_spec(&self) -> FoldSpec
pub fn fold_spec(&self) -> FoldSpec
The subset of these options that decides how text folds.
whole_word is deliberately not part of it: it decides which matches survive, not
how a single character folds. Keeping that distinction in the types is what lets
FoldedText answer both kinds of query from one fold — so a host app caching the
fold of a whole manuscript does not throw it away when the writer ticks a checkbox.
Trait Implementations§
Source§impl Clone for MatchOptions
impl Clone for MatchOptions
Source§fn clone(&self) -> MatchOptions
fn clone(&self) -> MatchOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MatchOptions
Source§impl Debug for MatchOptions
impl Debug for MatchOptions
Source§impl Default for MatchOptions
impl Default for MatchOptions
Source§fn default() -> MatchOptions
fn default() -> MatchOptions
impl Eq for MatchOptions
Source§impl From<&FindAllDto> for MatchOptions
impl From<&FindAllDto> for MatchOptions
Source§fn from(dto: &FindAllDto) -> MatchOptions
fn from(dto: &FindAllDto) -> MatchOptions
Source§impl From<&FindTextDto> for MatchOptions
impl From<&FindTextDto> for MatchOptions
Source§fn from(dto: &FindTextDto) -> MatchOptions
fn from(dto: &FindTextDto) -> MatchOptions
Source§impl From<&ReplaceTextDto> for MatchOptions
impl From<&ReplaceTextDto> for MatchOptions
Source§fn from(dto: &ReplaceTextDto) -> MatchOptions
fn from(dto: &ReplaceTextDto) -> MatchOptions
Source§impl Hash for MatchOptions
impl Hash for MatchOptions
Source§impl PartialEq for MatchOptions
impl PartialEq for MatchOptions
impl StructuralPartialEq for MatchOptions
Auto Trait Implementations§
impl Freeze for MatchOptions
impl RefUnwindSafe for MatchOptions
impl Send for MatchOptions
impl Sync for MatchOptions
impl Unpin for MatchOptions
impl UnsafeUnpin for MatchOptions
impl UnwindSafe for MatchOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.