pub struct LocalLspHttpCache<TSys: LocalHttpCacheSys> { /* private fields */ }Expand description
A vendor/ folder http cache for the lsp that provides functionality for doing a reverse mapping.
Implementations§
Source§impl<TSys: LocalHttpCacheSys> LocalLspHttpCache<TSys>
impl<TSys: LocalHttpCacheSys> LocalLspHttpCache<TSys>
pub fn new(path: PathBuf, global_cache: GlobalHttpCacheRc<TSys>) -> Self
pub fn get_file_url(&self, url: &Url) -> Option<Url>
pub fn get_remote_url(&self, path: &Path) -> Option<Url>
Trait Implementations§
Source§impl<TSys: Debug + LocalHttpCacheSys> Debug for LocalLspHttpCache<TSys>
impl<TSys: Debug + LocalHttpCacheSys> Debug for LocalLspHttpCache<TSys>
Source§impl<TSys: LocalHttpCacheSys> HttpCache for LocalLspHttpCache<TSys>
impl<TSys: LocalHttpCacheSys> HttpCache for LocalLspHttpCache<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 set(&self, url: &Url, headers: HeadersMap, content: &[u8]) -> Result<()>
fn get( &self, key: &HttpCacheItemKey<'_>, maybe_checksum: Option<Checksum<'_>>, ) -> Result<Option<CacheEntry>, CacheReadFileError>
fn read_modified_time( &self, key: &HttpCacheItemKey<'_>, ) -> Result<Option<SystemTime>>
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 LocalLspHttpCache<TSys>
impl<TSys> !RefUnwindSafe for LocalLspHttpCache<TSys>
impl<TSys> !Send for LocalLspHttpCache<TSys>
impl<TSys> !Sync for LocalLspHttpCache<TSys>
impl<TSys> Unpin for LocalLspHttpCache<TSys>where
TSys: Unpin,
impl<TSys> UnwindSafe for LocalLspHttpCache<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