StorageManager

Trait StorageManager 

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

Source

fn global_path(&self) -> &PathBuf

Get the global storage path

Source

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

Get the project storage path (if in a project)

Source

fn mode(&self) -> StorageMode

Get the current storage mode

Source

fn global_resource_path(&self, resource_type: ResourceType) -> PathBuf

Get the path for a resource type in global storage

Source

fn project_resource_path(&self, resource_type: ResourceType) -> Option<PathBuf>

Get the path for a resource type in project storage

Source

fn is_first_run(&self) -> bool

Check if this is the first run

Implementors§