Skip to main content

FileMatches

Trait FileMatches 

Source
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§

Source

fn file_path(&self) -> &str

Returns the path of the file.

Source

fn file_source(&self) -> Option<FileSource>

Returns where the file is, or None for matches outside of files.

Source

fn match_count(&self) -> usize

Returns the amount of matches in the file.

Source

fn match_details(&self, index: usize) -> Value

Returns a match, serialized.

Source

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

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

fn retain_matches(&mut self, indexes: &HashSet<usize>)

Source§

impl FileMatches for AtlasMatches

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

fn retain_matches(&mut self, indexes: &HashSet<usize>)

Source§

impl FileMatches for PortraitSettingsMatches

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

fn retain_matches(&mut self, indexes: &HashSet<usize>)

Source§

impl FileMatches for RigidModelMatches

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

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.

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

fn retain_matches(&mut self, indexes: &HashSet<usize>)

Source§

impl FileMatches for TableMatches

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

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.

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

fn retain_matches(&mut self, indexes: &HashSet<usize>)

Source§

impl FileMatches for UnitVariantMatches

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

fn retain_matches(&mut self, indexes: &HashSet<usize>)

Source§

impl FileMatches for UnknownMatches

Source§

fn file_path(&self) -> &str

Source§

fn file_source(&self) -> Option<FileSource>

Source§

fn match_count(&self) -> usize

Source§

fn match_details(&self, index: usize) -> Value

Source§

fn retain_matches(&mut self, indexes: &HashSet<usize>)

Implementors§