Struct broot::pattern::ContentExactPattern
source · pub struct ContentExactPattern { /* private fields */ }
Expand description
A pattern for searching in file content
Implementations§
source§impl ContentExactPattern
impl ContentExactPattern
pub fn new(pat: &str, max_file_size: usize) -> 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§
source§impl Clone for ContentExactPattern
impl Clone for ContentExactPattern
source§fn clone(&self) -> ContentExactPattern
fn clone(&self) -> ContentExactPattern
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 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§
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