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§
Sourcefn workspace_root(&self) -> &Path
fn workspace_root(&self) -> &Path
Absolute path to the application’s workspace root.
Sourcefn config_dir(&self) -> PathBuf
fn config_dir(&self) -> PathBuf
Returns the directory where configuration files should be stored.
Provided Methods§
Sourcefn telemetry_dir(&self) -> Option<PathBuf>
fn telemetry_dir(&self) -> Option<PathBuf>
Returns an optional directory for telemetry or log artifacts.