Struct broot::pattern::ContentRegexPattern
source · pub struct ContentRegexPattern { /* private fields */ }
Expand description
A regex for searching in file content
Implementations§
source§impl ContentRegexPattern
impl ContentRegexPattern
pub fn new( pat: &str, flags: &str, max_file_size: usize ) -> Result<Self, PatternError>
pub fn is_empty(&self) -> bool
pub fn to_regex_parts(&self) -> (String, String)
pub fn score_of(&self, candidate: Candidate<'_>) -> Option<i32>
pub fn try_get_content_match( &self, path: &Path, desired_len: usize ) -> Result<Option<ContentMatch>>
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
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 ContentRegexPattern
impl Clone for ContentRegexPattern
source§fn clone(&self) -> ContentRegexPattern
fn clone(&self) -> ContentRegexPattern
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 ContentRegexPattern
impl Debug for ContentRegexPattern
Auto Trait Implementations§
impl RefUnwindSafe for ContentRegexPattern
impl Send for ContentRegexPattern
impl Sync for ContentRegexPattern
impl Unpin for ContentRegexPattern
impl UnwindSafe for ContentRegexPattern
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