Struct broot::pattern::ExactPattern
source · pub struct ExactPattern { /* private fields */ }
Expand description
A pattern for exact matching
Implementations§
source§impl ExactPattern
impl ExactPattern
sourcepub fn from(pattern: &str) -> Self
pub fn from(pattern: &str) -> Self
build a pattern which will later be usable for fuzzy search. A pattern should be reused
pub fn is_empty(&self) -> bool
sourcepub fn find(&self, candidate: &str) -> Option<NameMatch>
pub fn find(&self, candidate: &str) -> Option<NameMatch>
return a match if the pattern can be found in the candidate string.
sourcepub fn try_get_match_line_count(&self, path: &Path) -> Result<Option<usize>>
pub fn try_get_match_line_count(&self, path: &Path) -> Result<Option<usize>>
get the line of the first match, if any (not used today, we use content_pattern to search in files)
sourcepub fn get_match_line_count(&self, path: &Path) -> Option<usize>
pub fn get_match_line_count(&self, path: &Path) -> Option<usize>
get the line of the first match, if any (not used today, we use content_pattern to search in files)
Trait Implementations§
source§impl Clone for ExactPattern
impl Clone for ExactPattern
source§fn clone(&self) -> ExactPattern
fn clone(&self) -> ExactPattern
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 more