pub struct PatternSaveTracker {
pub prefix_rules: &'static [PrefixSaveRule],
pub file_extensions: &'static [&'static str],
pub default_category: &'static str,
pub recursive: bool,
pub exclude_patterns: &'static [&'static str],
pub label_extractor: SaveLabelExtractor,
pub summary: CaptureSummary,
}Fields§
§prefix_rules: &'static [PrefixSaveRule]§file_extensions: &'static [&'static str]§default_category: &'static str§recursive: bool§exclude_patterns: &'static [&'static str]§label_extractor: SaveLabelExtractor§summary: CaptureSummaryImplementations§
Source§impl PatternSaveTracker
impl PatternSaveTracker
pub fn save_patterns(self) -> SmallVec<[String; 2]>
pub fn exclude_patterns(self) -> SmallVec<[String; 2]>
pub fn detect_saves(self, save_dir: &Path) -> Result<Vec<DetectedSave>>
pub fn describe_capture(self, saves: &[DetectedSave]) -> String
Trait Implementations§
Source§impl Clone for PatternSaveTracker
impl Clone for PatternSaveTracker
Source§fn clone(&self) -> PatternSaveTracker
fn clone(&self) -> PatternSaveTracker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PatternSaveTracker
impl Debug for PatternSaveTracker
Source§impl SaveTracker for PatternSaveTracker
impl SaveTracker for PatternSaveTracker
Source§fn 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.Source§fn 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.
Source§fn 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.Source§fn describe_capture(&self, saves: &[DetectedSave]) -> String
fn describe_capture(&self, saves: &[DetectedSave]) -> String
Generate a human-readable commit message for a capture.
impl Copy for PatternSaveTracker
Auto Trait Implementations§
impl Freeze for PatternSaveTracker
impl RefUnwindSafe for PatternSaveTracker
impl Send for PatternSaveTracker
impl Sync for PatternSaveTracker
impl Unpin for PatternSaveTracker
impl UnsafeUnpin for PatternSaveTracker
impl UnwindSafe for PatternSaveTracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more