pub struct LocalHttpCache<TSys: LocalHttpCacheSys> { /* private fields */ }Implementations§
Source§impl<TSys: LocalHttpCacheSys> LocalHttpCache<TSys>
impl<TSys: LocalHttpCacheSys> LocalHttpCache<TSys>
pub fn new( path: PathBuf, global_cache: GlobalHttpCacheRc<TSys>, allow_global_to_local: GlobalToLocalCopy, jsr_registry_url: Url, ) -> Self
pub fn local_path_for_url(&self, url: &Url) -> Result<Option<PathBuf>>
Trait Implementations§
Source§impl<TSys: Debug + LocalHttpCacheSys> Debug for LocalHttpCache<TSys>
impl<TSys: Debug + LocalHttpCacheSys> Debug for LocalHttpCache<TSys>
Source§impl<TSys: LocalHttpCacheSys> HttpCache for LocalHttpCache<TSys>
impl<TSys: LocalHttpCacheSys> HttpCache for LocalHttpCache<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<TSys> !Freeze for LocalHttpCache<TSys>
impl<TSys> !RefUnwindSafe for LocalHttpCache<TSys>
impl<TSys> !Send for LocalHttpCache<TSys>
impl<TSys> !Sync for LocalHttpCache<TSys>
impl<TSys> Unpin for LocalHttpCache<TSys>where
TSys: Unpin,
impl<TSys> UnwindSafe for LocalHttpCache<TSys>where
TSys: UnwindSafe + RefUnwindSafe,
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