pub struct AssetFetchCache(/* private fields */);Expand description
Shared only by pages within one batch or crawl. Never serialized.
Implementations§
Source§impl AssetFetchCache
impl AssetFetchCache
Sourcepub fn entry(&self, url: &str) -> Option<Arc<OnceCell<Attachment>>>
pub fn entry(&self, url: &str) -> Option<Arc<OnceCell<Attachment>>>
Limit retained keys and bytes per item; uncached items still work normally.
pub fn discard(&self, url: &str, cell: &Arc<OnceCell<Attachment>>)
Sourcepub fn seed(&self, url: &str, attachment: Attachment)
pub fn seed(&self, url: &str, attachment: Attachment)
Populate a task-local entry from an already persisted, verified asset.
Trait Implementations§
Source§impl Clone for AssetFetchCache
impl Clone for AssetFetchCache
Source§impl Debug for AssetFetchCache
impl Debug for AssetFetchCache
Source§impl Default for AssetFetchCache
impl Default for AssetFetchCache
Auto Trait Implementations§
impl Forget for AssetFetchCache
impl Freeze for AssetFetchCache
impl RefUnwindSafe for AssetFetchCache
impl Send for AssetFetchCache
impl Sync for AssetFetchCache
impl Unpin for AssetFetchCache
impl UnsafeUnpin for AssetFetchCache
impl UnwindSafe for AssetFetchCache
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