pub struct FileCache {
pub update_interval_seconds: Option<u64>,
pub cache_file_path: Option<String>,
}
Fields§
§update_interval_seconds: Option<u64>
§cache_file_path: Option<String>
Implementations§
Source§impl FileCache
impl FileCache
pub fn read_cache_file(&self) -> Result<Vec<u8>, FetchError>
pub async fn read_cache_file_async(&self) -> Result<Vec<u8>, FetchError>
pub fn write_cache_file(&self, bytes: &[u8]) -> bool
pub async fn write_cache_file_async(&self, bytes: &[u8]) -> bool
Sourcepub fn is_cache_timeout(&self) -> Result<Option<bool>, FetchError>
pub fn is_cache_timeout(&self) -> Result<Option<bool>, FetchError>
检查缓存文件是否超时
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileCache
impl RefUnwindSafe for FileCache
impl Send for FileCache
impl Sync for FileCache
impl Unpin for FileCache
impl UnwindSafe for FileCache
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