pub struct ResourcePool(/* private fields */);Expand description
Explicit project cache and logical allowance; clones share identity and accounting. Each new Assets owner starts isolated unless with_pool supplies a shared pool. Decoded Arc values can outlive all owners/handles and are not then pool-accounted.
Implementations§
Source§impl ResourcePool
impl ResourcePool
Sourcepub fn with_limits(limits: CacheLimits) -> Result<Self>
pub fn with_limits(limits: CacheLimits) -> Result<Self>
Uses a positive payload allowance and 1..=4096 cached entries.
Sourcepub fn max_entries(&self) -> usize
pub fn max_entries(&self) -> usize
Configured cached-entry allowance.
Sourcepub fn retained_bytes(&self) -> usize
pub fn retained_bytes(&self) -> usize
Logical payload retained by this project, not process RSS.
Trait Implementations§
Source§impl Clone for ResourcePool
impl Clone for ResourcePool
Auto Trait Implementations§
impl Forget for ResourcePool
impl Freeze for ResourcePool
impl RefUnwindSafe for ResourcePool
impl Send for ResourcePool
impl Sync for ResourcePool
impl Unpin for ResourcePool
impl UnsafeUnpin for ResourcePool
impl UnwindSafe for ResourcePool
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