Skip to main content

CollisionClassifier

Trait CollisionClassifier 

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

Source

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.

Source

fn classify_severity(&self, file_path: &str) -> CollisionSeverity

Classify the collision severity of a file based on its path.

Source

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".

Implementors§