Struct broot::pattern::ExactPattern
source · [−]pub struct ExactPattern { /* private fields */ }
Expand description
A pattern for exact matching
Implementations
sourceimpl 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
sourceimpl Clone for ExactPattern
impl Clone for ExactPattern
sourcefn clone(&self) -> ExactPattern
fn clone(&self) -> ExactPattern
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more