Skip to main content

EvictablePool

Trait EvictablePool 

Source
pub trait EvictablePool: MaybeSendSync {
    // Required methods
    fn evict_unused(&self) -> u64;
    fn bytes_in_use(&self) -> u64;
}
Expand description

Pool trait — drop unused resources on request. This is the single dyn exception in this crate; see the module doc-comment. The MaybeSendSync supertrait is Send + Sync off wasm and empty on wasm.

Required Methods§

Source

fn evict_unused(&self) -> u64

Reclaim unused resources; returns bytes freed.

Source

fn bytes_in_use(&self) -> u64

Current in-use byte count.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§