pub trait StorageManager: Send + Sync {
// Required methods
fn global_path(&self) -> &PathBuf;
fn project_path(&self) -> Option<&PathBuf>;
fn mode(&self) -> StorageMode;
fn global_resource_path(&self, resource_type: ResourceType) -> PathBuf;
fn project_resource_path(
&self,
resource_type: ResourceType,
) -> Option<PathBuf>;
fn is_first_run(&self) -> bool;
}Expand description
Storage manager trait for managing storage operations
Required Methods§
Sourcefn global_path(&self) -> &PathBuf
fn global_path(&self) -> &PathBuf
Get the global storage path
Sourcefn project_path(&self) -> Option<&PathBuf>
fn project_path(&self) -> Option<&PathBuf>
Get the project storage path (if in a project)
Sourcefn mode(&self) -> StorageMode
fn mode(&self) -> StorageMode
Get the current storage mode
Sourcefn global_resource_path(&self, resource_type: ResourceType) -> PathBuf
fn global_resource_path(&self, resource_type: ResourceType) -> PathBuf
Get the path for a resource type in global storage
Sourcefn project_resource_path(&self, resource_type: ResourceType) -> Option<PathBuf>
fn project_resource_path(&self, resource_type: ResourceType) -> Option<PathBuf>
Get the path for a resource type in project storage
Sourcefn is_first_run(&self) -> bool
fn is_first_run(&self) -> bool
Check if this is the first run