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 more