trait FileMatches {
// Required methods
fn file_path(&self) -> &str;
fn file_source(&self) -> Option<FileSource>;
fn match_count(&self) -> usize;
fn match_details(&self, index: usize) -> Value;
fn retain_matches(&mut self, indexes: &HashSet<usize>);
}Expand description
Common access to the matches of a file, whatever its type.
Required Methods§
Sourcefn file_source(&self) -> Option<FileSource>
fn file_source(&self) -> Option<FileSource>
Returns where the file is, or None for matches outside of files.
Sourcefn match_count(&self) -> usize
fn match_count(&self) -> usize
Returns the amount of matches in the file.
Sourcefn match_details(&self, index: usize) -> Value
fn match_details(&self, index: usize) -> Value
Returns a match, serialized.
Sourcefn retain_matches(&mut self, indexes: &HashSet<usize>)
fn retain_matches(&mut self, indexes: &HashSet<usize>)
Keeps only the matches at the provided indexes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl FileMatches for AnimFragmentBattleMatches
impl FileMatches for AnimFragmentBattleMatches
fn file_path(&self) -> &str
fn file_source(&self) -> Option<FileSource>
fn match_count(&self) -> usize
fn match_details(&self, index: usize) -> Value
fn retain_matches(&mut self, indexes: &HashSet<usize>)
Source§impl FileMatches for AtlasMatches
impl FileMatches for AtlasMatches
fn file_path(&self) -> &str
fn file_source(&self) -> Option<FileSource>
fn match_count(&self) -> usize
fn match_details(&self, index: usize) -> Value
fn retain_matches(&mut self, indexes: &HashSet<usize>)
Source§impl FileMatches for PortraitSettingsMatches
impl FileMatches for PortraitSettingsMatches
fn file_path(&self) -> &str
fn file_source(&self) -> Option<FileSource>
fn match_count(&self) -> usize
fn match_details(&self, index: usize) -> Value
fn retain_matches(&mut self, indexes: &HashSet<usize>)
Source§impl FileMatches for RigidModelMatches
impl FileMatches for RigidModelMatches
fn file_path(&self) -> &str
fn file_source(&self) -> Option<FileSource>
fn match_count(&self) -> usize
fn match_details(&self, index: usize) -> Value
fn retain_matches(&mut self, indexes: &HashSet<usize>)
Source§impl FileMatches for SchemaMatches
Schema matches are about column names, not files, so they have no path nor source.
impl FileMatches for SchemaMatches
Schema matches are about column names, not files, so they have no path nor source.
fn file_path(&self) -> &str
fn file_source(&self) -> Option<FileSource>
fn match_count(&self) -> usize
fn match_details(&self, index: usize) -> Value
fn retain_matches(&mut self, indexes: &HashSet<usize>)
Source§impl FileMatches for TableMatches
impl FileMatches for TableMatches
fn file_path(&self) -> &str
fn file_source(&self) -> Option<FileSource>
fn match_count(&self) -> usize
fn match_details(&self, index: usize) -> Value
fn retain_matches(&mut self, indexes: &HashSet<usize>)
Source§impl FileMatches for TextMatches
Text matches keep their text apart from their position, so the text is added to the details.
impl FileMatches for TextMatches
Text matches keep their text apart from their position, so the text is added to the details.