pub struct Retain { /* private fields */ }Expand description
Which objects ComponentManager::prune keeps. An object
is kept when it satisfies any enabled criterion; with none enabled everything is removed.
Several host versions can share one cache, so the usual policy combines both criteria: keep what this lock needs plus whatever any host used recently.
Implementations§
Source§impl Retain
impl Retain
Sourcepub fn referenced_by_lock(self) -> Self
pub fn referenced_by_lock(self) -> Self
Keep objects referenced by the manager’s lock (every target in it).
Sourcepub fn used_within_days(self, days: u64) -> Self
pub fn used_within_days(self, days: u64) -> Self
Keep objects loaded within the last days days.
Sourcepub fn used_within(self, window: Duration) -> Self
pub fn used_within(self, window: Duration) -> Self
Keep objects loaded within the last window.
Trait Implementations§
impl Eq for Retain
impl StructuralPartialEq for Retain
Auto Trait Implementations§
impl Freeze for Retain
impl RefUnwindSafe for Retain
impl Send for Retain
impl Sync for Retain
impl Unpin for Retain
impl UnsafeUnpin for Retain
impl UnwindSafe for Retain
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