SnapshotTarget

Trait SnapshotTarget 

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

Source

fn storage_dir(&self, base_dir: &Path) -> PathBuf

Get the storage directory for snapshots of this target

Source

fn content_path(&self) -> &Path

Get the content path to snapshot

Source

fn identifier(&self) -> String

Get identifier for display/messages

Source

fn should_exclude(&self, path: &Path, base: &Path) -> bool

Check if a file should be excluded from snapshot

Source

fn not_found_error(&self) -> DotAgentError

Error to return when source doesn’t exist

Implementors§