pub struct Cache { /* private fields */ }Expand description
Cache struct to manage cache operations
Implementations§
Source§impl Cache
impl Cache
Sourcepub fn new(config: &Config) -> Result<Cache, SpsError>
pub fn new(config: &Config) -> Result<Cache, SpsError>
Create a new Cache using the config’s cache_dir
Sourcepub fn store_raw(&self, filename: &str, data: &str) -> Result<(), SpsError>
pub fn store_raw(&self, filename: &str, data: &str) -> Result<(), SpsError>
Stores raw string data in the cache
Sourcepub fn load_raw(&self, filename: &str) -> Result<String, SpsError>
pub fn load_raw(&self, filename: &str) -> Result<String, SpsError>
Loads raw string data from the cache
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin 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