pub struct StringTracker { /* private fields */ }
Expand description
Main string tracking system
Implementations§
Source§impl StringTracker
impl StringTracker
Sourcepub fn with_components(
analyzer: Box<dyn StringAnalyzer>,
categorizer: Box<dyn Categorizer>,
) -> Self
pub fn with_components( analyzer: Box<dyn StringAnalyzer>, categorizer: Box<dyn Categorizer>, ) -> Self
Create a StringTracker with custom analyzer and categorizer
Sourcepub fn with_max_occurrences(self, max: usize) -> Self
pub fn with_max_occurrences(self, max: usize) -> Self
Set the maximum number of occurrences to track per string
Sourcepub fn track_string(
&self,
value: &str,
file_path: &str,
file_hash: &str,
tool_name: &str,
context: StringContext,
) -> Result<()>
pub fn track_string( &self, value: &str, file_path: &str, file_hash: &str, tool_name: &str, context: StringContext, ) -> Result<()>
Track a string occurrence
Sourcepub fn track_strings_from_results(
&self,
strings: &[String],
file_path: &str,
file_hash: &str,
tool_name: &str,
) -> Result<()>
pub fn track_strings_from_results( &self, strings: &[String], file_path: &str, file_hash: &str, tool_name: &str, ) -> Result<()>
Track multiple strings from results
Sourcepub fn get_statistics(&self, filter: Option<&StringFilter>) -> StringStatistics
pub fn get_statistics(&self, filter: Option<&StringFilter>) -> StringStatistics
Get statistics about tracked strings
Sourcepub fn get_string_details(&self, value: &str) -> Option<StringEntry>
pub fn get_string_details(&self, value: &str) -> Option<StringEntry>
Get detailed information about a specific string
Sourcepub fn search_strings(&self, query: &str, limit: usize) -> Vec<StringEntry>
pub fn search_strings(&self, query: &str, limit: usize) -> Vec<StringEntry>
Search for strings matching a query
Get strings related to a given string
Trait Implementations§
Source§impl Clone for StringTracker
impl Clone for StringTracker
Source§fn clone(&self) -> StringTracker
fn clone(&self) -> StringTracker
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for StringTracker
impl !RefUnwindSafe for StringTracker
impl Send for StringTracker
impl Sync for StringTracker
impl Unpin for StringTracker
impl !UnwindSafe for StringTracker
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