pub struct GlobalHttpCache<Sys: FsCreateDirAll + FsMetadata + FsOpen + FsRemoveFile + FsRename + ThreadSleep + SystemRandom + Clone> { /* private fields */ }
Implementations§
Source§impl<Sys: FsCreateDirAll + FsMetadata + FsOpen + FsRemoveFile + FsRename + ThreadSleep + SystemRandom + Clone> GlobalHttpCache<Sys>
impl<Sys: FsCreateDirAll + FsMetadata + FsOpen + FsRemoveFile + FsRename + ThreadSleep + SystemRandom + Clone> GlobalHttpCache<Sys>
Trait Implementations§
Source§impl<Sys: Debug + FsCreateDirAll + FsMetadata + FsOpen + FsRemoveFile + FsRename + ThreadSleep + SystemRandom + Clone> Debug for GlobalHttpCache<Sys>
impl<Sys: Debug + FsCreateDirAll + FsMetadata + FsOpen + FsRemoveFile + FsRename + ThreadSleep + SystemRandom + Clone> Debug for GlobalHttpCache<Sys>
Source§impl<TSys: FsCreateDirAll + FsMetadata + FsOpen + FsRead + FsRemoveFile + FsRename + ThreadSleep + SystemRandom + SystemTimeNow + Debug + Send + Sync + Clone> HttpCache for GlobalHttpCache<TSys>
impl<TSys: FsCreateDirAll + FsMetadata + FsOpen + FsRead + FsRemoveFile + FsRename + ThreadSleep + SystemRandom + SystemTimeNow + Debug + Send + Sync + Clone> HttpCache for GlobalHttpCache<TSys>
Source§fn cache_item_key<'a>(&self, url: &'a Url) -> Result<HttpCacheItemKey<'a>>
fn cache_item_key<'a>(&self, url: &'a Url) -> Result<HttpCacheItemKey<'a>>
A pre-computed key for looking up items in the cache.
fn contains(&self, url: &Url) -> bool
fn read_modified_time( &self, key: &HttpCacheItemKey<'_>, ) -> Result<Option<SystemTime>>
fn set(&self, url: &Url, headers: HeadersMap, content: &[u8]) -> Result<()>
fn get( &self, key: &HttpCacheItemKey<'_>, maybe_checksum: Option<Checksum<'_>>, ) -> Result<Option<CacheEntry>, CacheReadFileError>
Source§fn read_headers(&self, key: &HttpCacheItemKey<'_>) -> Result<Option<HeadersMap>>
fn read_headers(&self, key: &HttpCacheItemKey<'_>) -> Result<Option<HeadersMap>>
Reads the headers for the cache item.
Source§fn read_download_time(
&self,
key: &HttpCacheItemKey<'_>,
) -> Result<Option<SystemTime>>
fn read_download_time( &self, key: &HttpCacheItemKey<'_>, ) -> Result<Option<SystemTime>>
Reads the time the item was downloaded to the cache.
Auto Trait Implementations§
impl<Sys> Freeze for GlobalHttpCache<Sys>where
Sys: Freeze,
impl<Sys> RefUnwindSafe for GlobalHttpCache<Sys>where
Sys: RefUnwindSafe,
impl<Sys> Send for GlobalHttpCache<Sys>where
Sys: Send,
impl<Sys> Sync for GlobalHttpCache<Sys>where
Sys: Sync,
impl<Sys> Unpin for GlobalHttpCache<Sys>where
Sys: Unpin,
impl<Sys> UnwindSafe for GlobalHttpCache<Sys>where
Sys: 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