pub trait CollisionClassifier: Send + Sync {
// Required methods
fn index_archive(&self, archive_path: &Path) -> Result<Vec<(String, u64)>>;
fn classify_severity(&self, file_path: &str) -> CollisionSeverity;
fn archive_extensions(&self) -> &[&str];
}Expand description
Game-specific behaviour for collision detection.
Each game provides archive indexing and file severity classification.
Required Methods§
Sourcefn index_archive(&self, archive_path: &Path) -> Result<Vec<(String, u64)>>
fn index_archive(&self, archive_path: &Path) -> Result<Vec<(String, u64)>>
List files inside an archive at archive_path.
Returns (normalised_relative_path, size) pairs.
Sourcefn classify_severity(&self, file_path: &str) -> CollisionSeverity
fn classify_severity(&self, file_path: &str) -> CollisionSeverity
Classify the collision severity of a file based on its path.
Sourcefn archive_extensions(&self) -> &[&str]
fn archive_extensions(&self) -> &[&str]
File extensions (lowercase, no dot) that are archives for this game.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".