pub trait SnapshotTarget {
// Required methods
fn storage_dir(&self, base_dir: &Path) -> PathBuf;
fn content_path(&self) -> &Path;
fn identifier(&self) -> String;
fn should_exclude(&self, path: &Path, base: &Path) -> bool;
fn not_found_error(&self) -> DotAgentError;
}Expand description
Trait for types that can be snapshot targets
Required Methods§
Sourcefn storage_dir(&self, base_dir: &Path) -> PathBuf
fn storage_dir(&self, base_dir: &Path) -> PathBuf
Get the storage directory for snapshots of this target
Sourcefn content_path(&self) -> &Path
fn content_path(&self) -> &Path
Get the content path to snapshot
Sourcefn identifier(&self) -> String
fn identifier(&self) -> String
Get identifier for display/messages
Sourcefn should_exclude(&self, path: &Path, base: &Path) -> bool
fn should_exclude(&self, path: &Path, base: &Path) -> bool
Check if a file should be excluded from snapshot
Sourcefn not_found_error(&self) -> DotAgentError
fn not_found_error(&self) -> DotAgentError
Error to return when source doesn’t exist