#[non_exhaustive]pub struct CacheOptions {
pub location: CacheLocation,
pub images: CachePolicy,
}Expand description
Where an app’s caches are kept and how much each keeps. The default: the system’s cache directory, each cache at its default size.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.location: CacheLocationThe root of the app’s caches: each in <root>/<app id>/<kind>.
images: CachePolicyThe images the app downloads, kept as the server sent them
(images).
Implementations§
Source§impl CacheOptions
impl CacheOptions
Sourcepub fn at(location: CacheLocation) -> Self
pub fn at(location: CacheLocation) -> Self
Caches in location, each at its default size.
Sourcepub fn with_images(self, images: CachePolicy) -> Self
pub fn with_images(self, images: CachePolicy) -> Self
These options with images for the images the app downloads.
Trait Implementations§
Source§impl Clone for CacheOptions
impl Clone for CacheOptions
Source§impl Debug for CacheOptions
impl Debug for CacheOptions
Source§impl Default for CacheOptions
impl Default for CacheOptions
impl Eq for CacheOptions
Source§impl PartialEq for CacheOptions
impl PartialEq for CacheOptions
impl StructuralPartialEq for CacheOptions
Auto Trait Implementations§
impl Forget for CacheOptions
impl Freeze for CacheOptions
impl Move for CacheOptions
impl RefUnwindSafe for CacheOptions
impl Send for CacheOptionswhere
RawVecInner: Send,
impl Sync for CacheOptionswhere
RawVecInner: Sync,
impl Unpin for CacheOptions
impl UnsafeUnpin for CacheOptions
impl UnwindSafe for CacheOptionswhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.