WorkspacePaths

Trait WorkspacePaths 

Source
pub trait WorkspacePaths: Send + Sync {
    // Required methods
    fn workspace_root(&self) -> &Path;
    fn config_dir(&self) -> PathBuf;

    // Provided methods
    fn cache_dir(&self) -> Option<PathBuf> { ... }
    fn telemetry_dir(&self) -> Option<PathBuf> { ... }
}
Expand description

Provides the root directories an application uses to store data.

Required Methods§

Source

fn workspace_root(&self) -> &Path

Absolute path to the application’s workspace root.

Source

fn config_dir(&self) -> PathBuf

Returns the directory where configuration files should be stored.

Provided Methods§

Source

fn cache_dir(&self) -> Option<PathBuf>

Returns an optional cache directory for transient data.

Source

fn telemetry_dir(&self) -> Option<PathBuf>

Returns an optional directory for telemetry or log artifacts.

Implementors§