pub struct KSMRCache { /* private fields */ }Implementations§
Source§impl KSMRCache
impl KSMRCache
pub fn new_file_cache(file_path: Option<&str>) -> Result<Self, KSMRError>
Sourcepub fn new_memory_cache() -> Result<Self, KSMRError>
pub fn new_memory_cache() -> Result<Self, KSMRError>
This is not persistent and is not useful for most use cases, please prefer new_file_cache over this implementation.
pub fn new_none() -> Self
pub fn save_cached_value(&mut self, data: &[u8]) -> Result<(), KSMRError>
pub fn get_cached_value(&self) -> Result<Vec<u8>, KSMRError>
pub fn purge(&mut self) -> Result<(), KSMRError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KSMRCache
impl RefUnwindSafe for KSMRCache
impl Send for KSMRCache
impl Sync for KSMRCache
impl Unpin for KSMRCache
impl UnwindSafe for KSMRCache
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