pub enum CacheConfig {
Local,
Target,
Global,
Directory(PathBuf),
}Expand description
Cache location options.
Variants§
Local
Stores cache in the current working directory.
Target
Stores cache in the project’s target/environment directory
(default).
Global
Stores cache in the system’s user cache directory.
Directory(PathBuf)
Stores cache under a user-specified directory. The environment database file is placed inside it, not at this path.
Implementations§
Source§impl CacheConfig
impl CacheConfig
Sourcepub fn root(&self) -> PathBuf
pub fn root(&self) -> PathBuf
Returns the root directory for the cache.
Every arm degrades rather than fails: none of these look-ups is under the application’s control, and a cache root that can’t be resolved must cost a recompute, not abort the process. A root that turns out to be unwritable is handled one level down, when the database is opened.
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§impl Debug for CacheConfig
impl Debug for CacheConfig
Source§impl Default for CacheConfig
impl Default for CacheConfig
Source§impl<'de> Deserialize<'de> for CacheConfig
impl<'de> Deserialize<'de> for CacheConfig
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 CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin for CacheConfig
impl UnwindSafe for CacheConfig
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