pub struct Cache { /* private fields */ }Expand description
Application-owned paths. No path supplied by the webview is accepted.
Implementations§
Source§impl Cache
impl Cache
Sourcepub fn new(root: PathBuf) -> Self
pub fn new(root: PathBuf) -> Self
Construct an isolated cache location without modifying existing files.
Sourcepub fn clear(&self) -> Result<(), String>
pub fn clear(&self) -> Result<(), String>
Remove only this source’s disposable catalogue and artwork, never personal stores.
Sourcepub fn load(&self) -> Result<Option<Value>, String>
pub fn load(&self) -> Result<Option<Value>, String>
A missing cache is distinct from an unreadable or incompatible cache. Old public caches lose private policy metadata atomically; supervised projections remain process-only.
Sourcepub fn save(&self, snapshot: Value) -> Result<Value, String>
pub fn save(&self, snapshot: Value) -> Result<Value, String>
Atomically publish a complete library snapshot after explicit synchronization.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnsafeUnpin for Cache
impl UnwindSafe for Cache
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