pub trait SaveTracker: Send + Sync {
// Required methods
fn save_patterns(&self) -> SmallVec<[String; 2]>;
fn detect_saves(&self, save_dir: &Path) -> Result<Vec<DetectedSave>>;
// Provided methods
fn exclude_patterns(&self) -> SmallVec<[String; 2]> { ... }
fn describe_capture(&self, saves: &[DetectedSave]) -> String { ... }
}Expand description
Game-specific save detection and classification.
Implemented per-game alongside GamePlugin. The core SaveManager handles
the git vault; this trait tells it what to look for and how to describe it.
Required Methods§
Sourcefn save_patterns(&self) -> SmallVec<[String; 2]>
fn save_patterns(&self) -> SmallVec<[String; 2]>
Glob patterns matching save entries in the save directory.
Typically 1–3 patterns per game; SmallVec<[_; 2]> avoids heap allocation.
Sourcefn detect_saves(&self, save_dir: &Path) -> Result<Vec<DetectedSave>>
fn detect_saves(&self, save_dir: &Path) -> Result<Vec<DetectedSave>>
Scan the save directory and return all detected saves with classification.
Provided Methods§
Sourcefn exclude_patterns(&self) -> SmallVec<[String; 2]>
fn exclude_patterns(&self) -> SmallVec<[String; 2]>
Patterns to exclude from auto-capture triggers (files that exist in
the save dir but aren’t actual saves, e.g. global settings).
Typically 0–2 patterns; SmallVec<[_; 2]> avoids heap allocation.
Sourcefn describe_capture(&self, saves: &[DetectedSave]) -> String
fn describe_capture(&self, saves: &[DetectedSave]) -> String
Generate a human-readable commit message for a capture.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".