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§
Sourcefn evict_unused(&self) -> u64
fn evict_unused(&self) -> u64
Reclaim unused resources; returns bytes freed.
Sourcefn bytes_in_use(&self) -> u64
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".