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 moresource§impl Debug for ExactPattern
impl Debug for ExactPattern
Auto Trait Implementations§
impl RefUnwindSafe for ExactPattern
impl Send for ExactPattern
impl Sync for ExactPattern
impl Unpin for ExactPattern
impl UnwindSafe for ExactPattern
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