pub struct TileCache { /* private fields */ }Expand description
Multi-level tile cache
Implementations§
Source§impl TileCache
impl TileCache
Sourcepub fn new(config: TileCacheConfig) -> Self
pub fn new(config: TileCacheConfig) -> Self
Create a new tile cache
Sourcepub fn clear(&self) -> CacheResult<()>
pub fn clear(&self) -> CacheResult<()>
Clear all cached entries
If an internal lock is poisoned (a prior panic occurred while it was
held), the poisoned guard is recovered via into_inner() so the clear
still takes effect, and the poisoning is surfaced via a warning rather
than silently leaving stale state behind.
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Get cache statistics
On lock poisoning, the last-known stats are recovered (they remain valid after a panic) and a warning is emitted, instead of silently returning a zeroed default that would hide the underlying fault from operators.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TileCache
impl RefUnwindSafe for TileCache
impl Send for TileCache
impl Sync for TileCache
impl Unpin for TileCache
impl UnsafeUnpin for TileCache
impl UnwindSafe for TileCache
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