Enum broot::pattern::SearchMode
source · pub enum SearchMode {
NameExact,
NameFuzzy,
NameRegex,
NameTokens,
PathExact,
PathFuzzy,
PathRegex,
PathTokens,
ContentExact,
ContentRegex,
}
Expand description
a valid combination of SearchObject and SearchKind, determine how a pattern will be used
Variants§
NameExact
NameFuzzy
NameRegex
NameTokens
PathExact
PathFuzzy
PathRegex
PathTokens
ContentExact
ContentRegex
Implementations§
source§impl SearchMode
impl SearchMode
sourcepub fn prefix(self, con: &AppContext) -> String
pub fn prefix(self, con: &AppContext) -> String
Return the prefix to type, eg “/” in standard for a name-regex, “” for a name-fuzzy, and “ep” for a path-exact
pub fn object(self) -> SearchObject
pub fn kind(self) -> SearchKind
Trait Implementations§
source§impl Clone for SearchMode
impl Clone for SearchMode
source§fn clone(&self) -> SearchMode
fn clone(&self) -> SearchMode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SearchMode
impl Debug for SearchMode
source§impl Hash for SearchMode
impl Hash for SearchMode
source§impl PartialEq for SearchMode
impl PartialEq for SearchMode
source§fn eq(&self, other: &SearchMode) -> bool
fn eq(&self, other: &SearchMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SearchMode
impl Eq for SearchMode
impl StructuralPartialEq for SearchMode
Auto Trait Implementations§
impl RefUnwindSafe for SearchMode
impl Send for SearchMode
impl Sync for SearchMode
impl Unpin for SearchMode
impl UnwindSafe for SearchMode
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
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.