pub trait BaseStrategy {
// Required methods
fn home_dir(&self) -> &Path;
fn config_dir(&self) -> PathBuf;
fn data_dir(&self) -> PathBuf;
fn cache_dir(&self) -> PathBuf;
fn state_dir(&self) -> Option<PathBuf>;
fn runtime_dir(&self) -> Option<PathBuf>;
}Expand description
Provides configuration, data, and cache directories of the current user.
Required Methods§
Sourcefn config_dir(&self) -> PathBuf
fn config_dir(&self) -> PathBuf
Gets the user’s configuration directory.
Sourcefn state_dir(&self) -> Option<PathBuf>
fn state_dir(&self) -> Option<PathBuf>
Gets the user’s state directory.
Currently, only the Xdg strategy supports this.
Sourcefn runtime_dir(&self) -> Option<PathBuf>
fn runtime_dir(&self) -> Option<PathBuf>
Gets the user’s runtime directory.
Currently, only the Xdg strategy supports this.
Note: The XDG Base Directory Specification places additional requirements on this directory related to ownership, permissions, and persistence. This library does not check these requirements.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".