pub struct CacheOption { /* private fields */ }Expand description
Define the option to create a cache.
Implementations§
Source§impl CacheOption
impl CacheOption
Sourcepub fn separator<S>(self, separator: S) -> CacheOption
pub fn separator<S>(self, separator: S) -> CacheOption
The separator used between each entry in the cache.
It should not be used in both the keys and the values.
Sourcepub fn version<V>(self, version: V) -> CacheOption
pub fn version<V>(self, version: V) -> CacheOption
The version used for the cache.
Sourcepub fn name<R>(self, name: R) -> CacheOption
pub fn name<R>(self, name: R) -> CacheOption
The name for the cache.
It will appear in the directory “$HOME/.cache/{name}/”
Sourcepub fn root<R>(self, path: R) -> CacheOption
pub fn root<R>(self, path: R) -> CacheOption
The root path for the cache.
It will appear in the directory “{path}/{name}/”
Trait Implementations§
Source§impl Debug for CacheOption
impl Debug for CacheOption
Source§impl Default for CacheOption
impl Default for CacheOption
Source§fn default() -> CacheOption
fn default() -> CacheOption
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CacheOption
impl RefUnwindSafe for CacheOption
impl Send for CacheOption
impl Sync for CacheOption
impl Unpin for CacheOption
impl UnwindSafe for CacheOption
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more