pub struct PaneRetentionPolicy {
pub budget: PaneRetentionBudget,
pub conservative_debug: bool,
}Expand description
A bounded-retention policy: a PaneRetentionBudget plus a conservative
debugging override that disables pruning.
Fields§
§budget: PaneRetentionBudgetThe memory ceiling.
conservative_debug: boolWhen true, pruning is disabled: over-budget state is retained (held)
for debugging rather than discarded, and the decision reports
PaneRetentionOutcome::ConservativeHold.
Implementations§
Source§impl PaneRetentionPolicy
impl PaneRetentionPolicy
Sourcepub const fn bounded(
max_retained_bytes: usize,
max_retained_units: usize,
) -> Self
pub const fn bounded( max_retained_bytes: usize, max_retained_units: usize, ) -> Self
A pruning policy bounded by max_retained_bytes and max_retained_units.
Sourcepub const fn unbounded() -> Self
pub const fn unbounded() -> Self
An unbounded policy — never prunes (the implicit debug default).
Sourcepub const fn conservative(self) -> Self
pub const fn conservative(self) -> Self
Return this policy in conservative-debug mode: pruning is disabled and over-budget state is held rather than discarded.
Trait Implementations§
Source§impl Clone for PaneRetentionPolicy
impl Clone for PaneRetentionPolicy
Source§fn clone(&self) -> PaneRetentionPolicy
fn clone(&self) -> PaneRetentionPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PaneRetentionPolicy
Source§impl Debug for PaneRetentionPolicy
impl Debug for PaneRetentionPolicy
impl Eq for PaneRetentionPolicy
Source§impl PartialEq for PaneRetentionPolicy
impl PartialEq for PaneRetentionPolicy
Source§fn eq(&self, other: &PaneRetentionPolicy) -> bool
fn eq(&self, other: &PaneRetentionPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PaneRetentionPolicy
impl Serialize for PaneRetentionPolicy
impl StructuralPartialEq for PaneRetentionPolicy
Auto Trait Implementations§
impl Freeze for PaneRetentionPolicy
impl RefUnwindSafe for PaneRetentionPolicy
impl Send for PaneRetentionPolicy
impl Sync for PaneRetentionPolicy
impl Unpin for PaneRetentionPolicy
impl UnsafeUnpin for PaneRetentionPolicy
impl UnwindSafe for PaneRetentionPolicy
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