Struct broot::pattern::ContentExactPattern
source · [−]pub struct ContentExactPattern { /* private fields */ }
Expand description
A pattern for searching in file content
Implementations
sourceimpl ContentExactPattern
impl ContentExactPattern
pub fn from(pat: &str) -> Self
pub fn as_str(&self) -> &str
pub fn is_empty(&self) -> bool
pub fn to_regex_parts(&self) -> (String, String)
pub fn score_of(&self, candidate: Candidate<'_>) -> Option<i32>
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
pub fn get_content_match(
&self,
path: &Path,
desired_len: usize
) -> Option<ContentMatch>
Trait Implementations
sourceimpl Clone for ContentExactPattern
impl Clone for ContentExactPattern
sourcefn clone(&self) -> ContentExactPattern
fn clone(&self) -> ContentExactPattern
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 ContentExactPattern
impl Debug for ContentExactPattern
Auto Trait Implementations
impl RefUnwindSafe for ContentExactPattern
impl Send for ContentExactPattern
impl Sync for ContentExactPattern
impl Unpin for ContentExactPattern
impl UnwindSafe for ContentExactPattern
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