pub struct HttpCache { /* private fields */ }Implementations§
Source§impl HttpCache
impl HttpCache
pub fn new(max_entries: usize) -> Self
pub fn get(&self, url: &str) -> Result<&CacheEntry, CacheError>
pub fn put(&mut self, entry: CacheEntry) -> Result<(), CacheError>
pub fn remove(&mut self, url: &str) -> Result<(), CacheError>
pub fn validate(&self, url: &str) -> Result<CacheValidation, CacheError>
pub fn get_conditional_headers( &self, url: &str, ) -> Result<ConditionalHeaders, CacheError>
pub fn update_from_response( &mut self, url: &str, response: &Response, ) -> Result<(), CacheError>
pub fn clear(&mut self)
pub fn stats(&self) -> CacheStats
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpCache
impl RefUnwindSafe for HttpCache
impl Send for HttpCache
impl Sync for HttpCache
impl Unpin for HttpCache
impl UnsafeUnpin for HttpCache
impl UnwindSafe for HttpCache
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