pub struct PathConfig {
pub base_dir: Option<PathBuf>,
pub tools_dir: Option<PathBuf>,
pub cache_dir: Option<PathBuf>,
pub config_dir: Option<PathBuf>,
pub tmp_dir: Option<PathBuf>,
}Expand description
Configuration for path management
Fields§
§base_dir: Option<PathBuf>Custom base directory for vx installations
tools_dir: Option<PathBuf>Custom tools directory
cache_dir: Option<PathBuf>Custom cache directory
config_dir: Option<PathBuf>Custom config directory
tmp_dir: Option<PathBuf>Custom temporary directory
Implementations§
Source§impl PathConfig
impl PathConfig
Sourcepub fn with_base_dir<P: AsRef<Path>>(base_dir: P) -> Self
pub fn with_base_dir<P: AsRef<Path>>(base_dir: P) -> Self
Create PathConfig with custom base directory
Sourcepub fn create_path_manager(&self) -> Result<PathManager>
pub fn create_path_manager(&self) -> Result<PathManager>
Create a PathManager from this configuration
Sourcepub fn create_vx_paths(&self) -> Result<VxPaths>
pub fn create_vx_paths(&self) -> Result<VxPaths>
Create VxPaths from this configuration
Sourcepub fn merge(&mut self, other: &PathConfig)
pub fn merge(&mut self, other: &PathConfig)
Merge with another PathConfig, preferring values from other
Trait Implementations§
Source§impl Clone for PathConfig
impl Clone for PathConfig
Source§impl Debug for PathConfig
impl Debug for PathConfig
Source§impl Default for PathConfig
impl Default for PathConfig
Source§impl<'de> Deserialize<'de> for PathConfig
impl<'de> Deserialize<'de> for PathConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PathConfig
impl RefUnwindSafe for PathConfig
impl Send for PathConfig
impl Sync for PathConfig
impl Unpin for PathConfig
impl UnsafeUnpin for PathConfig
impl UnwindSafe for PathConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more